List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:November 14 1999 9:33pm
Subject:Try to create new db in a directory other than /var/lib/mysql
View as plain text  
>>>>> "Kulai," == Kulai, George <George.Kulai@stripped> writes:

Kulai,> Hi,
Kulai,> I am a rookie to MySQL and just installed 3.22.27 RPM on RH 6.0. Everything
Kulai,> is fine! And now I want to create a new db on a new directory
Kulai,> /home/mysql_data but left mysql system db where it is /var/lib/mysql. Thus,
Kulai,> I tried the following:
Kulai,> 1. create /etc/my.cnf with
Kulai,> [mysqld]
Kulai,> datadir=/var/lib/mysql
Kulai,> 2. edit /etc/rc.d/init.d/mysql
Kulai,> change
Kulai,> datadir=/var/lib/mysql
Kulai,> to
Kulai,> datadir=/home/mysql_data
Kulai,> After that, the mysqld can start but create a new db will still go to
Kulai,> /var/lib/mysql not /home/mysql_data. mysqladmin variables still shows
Kulai,> datadir is /var/lib/mysql.

Kulai,> Please correct me where went wrong.

Hi!

You can't move just some of the databases (there can only be one datadir)

Why not just creata a link to /my/mysql_data/database from
/var/lib/mysql/database ?

Regards,
Monty
Thread
Try to create new db in a directory other than /var/lib/mysqlGeorge Kulai27 Oct
  • Try to create new db in a directory other than /var/lib/mysqlMichael Widenius15 Nov