Warning: Undefined variable $html in /usr/share/nginx/html/lib/plugins/tabinclude/helper.php on line 240

Warning: Cannot modify header information - headers already sent by (output started at /usr/share/nginx/html/lib/plugins/tabinclude/helper.php:240) in /usr/share/nginx/html/inc/Action/Export.php on line 106

Warning: Cannot modify header information - headers already sent by (output started at /usr/share/nginx/html/lib/plugins/tabinclude/helper.php:240) in /usr/share/nginx/html/inc/Action/Export.php on line 106
mysql_mysqldump

mysqldump

  • Intro
  • Database Import/Export
  • Table Import/Export

Dumping and Importing database

Best practice states that the /home/user/.my.cnf or /root/.my.cnf file should be created (depending on what user you are taking the dump with) with the appropriate credentials before taking a mysql dump. This is not mandatory but certainly makes life easier when working with mysql
Creating the file is as easy as:

vim /root/.my.cnf
[client]
user: root
password: mypassword

Viewing databases outside of mysql

You can view your mysql databases without logging into mysql with the following command:

mysql -e "show databases"
or
mysqlshow