mysql_mysqldump_intro
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_intro.txt · Last modified: 2024/05/23 07:26 by 127.0.0.1