On 01/31/2017 06:33 PM, Per Jessen wrote:
george from the tribe wrote:
Ok, so I used the following procedure https://en.opensuse.org/SDB:LAMP_setup
to set up an apache2 web server, then php7, and then the mysql server with mariadb. Following that procedure in the SDB, it ran great, I was able to set up a small database, connect to it and edit it with phpmyadmin, and was pretty happy with it. Of course, there is one problem with that setup, and that is that it installs all the database files in the root partition. The SDB doesn't give any guidelines for how to move the database to my home partition, which is where I want it to be.
stop mysql move /var/lib/mysql to where you want it to be amend /etc/my.cnf accordingly. start mysql
The directory where the database was installed at first was here: /var/lib/mysql And the directory that had the apache2 web server and phpmyadmin was here: /srv/www/htdocs
right.
Also, there was a file, /etc/my.cnf, in which you could change the location of the database.
So here is what I did - I shutdown thy mysql service with systemctl stop mysql
Then I went into /etc/my.cnf and put in this line where it says to in the file:
# Remove leading # if you want to store your database elsewhere datadir = /home/george/FaithWiringDB/dbproj/mysql
Then I copied the mysql files from /var/lib/mysql over to /home/george/FaithWiringDB/dbproj/mysql
at first I changed the permissions to george:users, but that didn't work so I changed them back to root:root
Uh, mysql.mysql would be correct. Unless you also changed mysql to run with your userid?
To begin with, see what the logs in /var/log/mysql have to say.
Ok, great, it started up this morning and I can access phpmyadmin. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org