Web Hosting Talk







View Full Version : MYSQL rpm and pkg


mhosang
10-03-2001, 06:05 PM
Hi

Some months ago, I installed MySQL through a rpm file

Now, I want to install the pkg version.

I uninstalled the rpm and installed the pkg.. all works fine...

but the problem is:
My databases are still in the /var/lib/mysql directory...

How can I tell mysql to store the databases in /home/mysql ???

thx for your help

jks
10-03-2001, 06:14 PM
Originally posted by mhosang
but the problem is:
My databases are still in the /var/lib/mysql directory...
How can I tell mysql to store the databases in /home/mysql ???


An easy way to do it is this:

1. Stop MySQL

2. mkdir /home/mysql

3. Move all files from /var/lib/mysql to /home/mysql

4. Remove the /var/lib/mysql di

5. ln -s /home/mysql /var/lib/mysql

6. Start MySQL

mhosang
10-04-2001, 05:29 AM
thx!

but this won't work...

I made the symbolic link and tried to start mysqld ... but it won't run...


now, I will try to install the source with ./configure and some options...

jks
10-04-2001, 09:42 AM
Originally posted by mhosang
thx!

but this won't work...

I made the symbolic link and tried to start mysqld ... but it won't run...


Then examine the logs to see what's wrong.

I've done the above mentioned procedure a few hundred times, so I know it works.

Most probably, your have your file permissions mixed up. Do two commands like this:

chown -R mysql.mysql /home/mysql
chown mysql.mysql /var/lib/mysql

And then start MySQL.

That should work.

mhosang
10-04-2001, 10:27 AM
thx!

now it works :-)))))))