User Tools

Site Tools


mysql_mysqldump_intro

This is an old revision of the document!


Dumping and Importing database

To take a mysql dump you should not be logged into mysql, you will just need to be in the terminal. Use the following command to export the db to the directory you are currently in.
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

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.1450095435.txt.gz · Last modified: 2024/05/23 07:26 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki