Search Engine: Elastic

Article ID: 4571, created on Mar 24, 2008, last review on May 11, 2014

  • Applies to:
  • Sphera


When trying to start MySQL daemon under the VDS you may get this error:


mysq.hosts table cannot be located.

mysql failed


This means that you lost ‘hosts’ table in the ‘mysql’ database, or the whole ‘mysql’ database ( the database that contains all the authentication data, needed to start and connect MySQL ).


To recover from this issue you will need restore the lost ‘mysql’ database by the following actions:


NOTE: The following actions must be performed as root, after that you must login as the VDS owner to start the MySQL engine.


If you have the backup:


Restore the ‘mysql’ sub-directory in the  

‘~VDS/usr/local/mysql/var/’ folder.


If you do not have backup:


  1. Change to ‘~VDS/usr/local/mysql/var/’ directory.
  2. Backup all the directories, except ‘mysql’ directory:


# tar czvpf backup.tgz dir1 [dir2] [dir3] …  


  1. Move created archive file four levels up :


# mv backup.tgz ../../../../


  1. Now you can safely reinstall MySQL Value Up application from the user Control Panel.
  2. After you reinstalled MySQL VA, you should restore the backed up databases:


# cd  ~VDS/usr/local/mysql/var/

# mv ../../../../backup.tgz .

# tar xzvpf backup.tgz

# rm –f backup.tgz


  1. Login as the VDS owner and start MySQL engine:


$ /usr/local/mysql/bin/mysql.rc start


7. Check if you can connect to MySQL : 


$ mysql

5f478287f7e74fe9b07217d8131cd741 6311ae17c1ee52b36e68aaf4ad066387

Email subscription for changes to this article
Save as PDF