User Tools

Site Tools


mysql_mysqldump

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

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 

mysql_mysqldump.txt · Last modified: 2024/05/23 07:26 by 127.0.0.1