Due to a mishap I deleted the entire /var/lib/mysql directory. Since the database did not contain anything important, I do not want to go through the hassle of restoring it from an old backup, but instead create the directory structure from scratch. How do I do it without reinstalling MySQL?
MySQL – How to Reinitialize /var/lib/mysql Files on Debian
debianlinuxMySQL
Related Question
- How to Restore Users and Passwords for MySQL Server
- MySQL Backup – Restore Database with Only .frm Files
- Mysql – Scenario/Method (idea) for transfering database from one server to another
- CentOS Container – Installing MariaDB Server in Docker
- MySQL DB Restore – How to Restore MySQL Database from Files on Debian
- How to Manually Copy Binary Log Files in Xtrabackup for MySQL
Best Answer
You should be able to just run
mysql_install_db
from the command linePlease read the MySQL Documentation in full for
mysql_install_db
, then ...GIVE IT A TRY !!!
If it does not work on the first try, do this
then run
mysql_install_db
again