Category Archives: MySQL

Backup a MySQL database

I’ll just quickly cover some options here to backup a MySQL database. The first will output all the data and all the databases along with the schema: mysqldump -u <user> -p -h <hostname> –all-databases > all_databases.sql The next option will output just the schema for all of the databases: mysqldump -d -u <user> -p -h [...]

Recover MySQL password

You can recover MySQL database server password with following five easy steps. Here are commands you need to type for each step (login as the root user): Stop mysql service Start to MySQL server w/o password: Connect to mysql server using mysql client: Setup new MySQL root user password Stop MySQL Server: Start MySQL server [...]