MySQL Forums
Forum List  »  Install & Repo

Re: Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
Posted by: Gattu Sevalkar
Date: April 04, 2007 06:45AM

So Guys, I was able to solve the problem by simply copying the mysql from directory to whatever you configured in "datadir".

So heres how it goes.

In my.cnf say you have:
datadir = /new/data/dir/for/mysql/

The default directory for mysql data is /var/lib/mysql/. It contains a directory named "mysql", which contains all databases or datasets created by "mysql_install_db" command. me need to copy that in the dir specified by "datadir".

cp -r /var/lib/mysql/mysql/ /new/data/dir/for/mysql/

and now you should be good to go.

For someone who is trying to do mysqld_multi with different "datadir" for each server.. copy /var/lib/mysql/mysql/ in each servers data directory.

You might have to change the owner of all the just copied folders and files to "mysql".

chown mysql:mysql -R /new/data/dir/for/mysql/mysql

;)
--

Gattu

Options: ReplyQuote


Subject
Written By
Posted
Re: Fatal error: Can't open and lock privilege tables: Table 'mysql.host' doesn't exist
April 04, 2007 06:45AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.