My personal Linux notes, a work in progress, shared online with the world. From intro to pro Linux Administration.
Wednesday, October 30, 2013
Using mysqldump - How to back up a MySQL database on Linux with the mysql dump command
You do not need to invoke the mysql command or log into your MySQL server..
From your linux shell command line type:
MyLinuxServer:/ # mysqldump -u root -p databaseName > databaseBackupFileName.sql;
You will be prompted to enter the password next "Enter password:"
Log into a MySQL server
Command:
MyLinuxServer:/ # mysql -u root -p
You will be prompted to enter the password "Enter password:" next
MyLinuxServer:/ # mysql -u root -p
You will be prompted to enter the password "Enter password:" next
Tuesday, October 22, 2013
Stop, Start, Restart, Status of MySQL server
I've tired many commands, I find these to work the best using the Sys-V init scripts located in
Start:
/etc/init.d
.Start:
sudo /etc/init.d/mysql start
Stop:sudo /etc/init.d/mysql stop
Restart / reload configs:sudo /etc/init.d/mysql restart
Check run status:sudo /etc/init.d/mysql status
Subscribe to:
Comments (Atom)