Failure to start new MySQL server

less than 1 minute read

We use replication for our MySQL server and perform a snapshot rsync to re-initialize the slave servers. One difference today was that I had to create a whole new server from scratch and perform the same re-initialization. Everything worked fine until I tried to start the server:

Fatal error: Can’t open and lock privilege tables: Table ‘mysql.host’ doesn’t exist

The server was new and had not been initialized yet. I had copied all the data files including the my.cnf files and had expected the MySQLd to work! Well, doesn't always happen that way eh?

Anyways, all that I had to do was to tell MySQLd where the data is located:

mysql_install_db –user=mysql –ldata=/datadir in my.cnf

MySQL came up and is replicating again!

Leave a Comment

Your email address will not be published. Required fields are marked *

Loading...