How To Install, Back Up and Restore MySQL

1. Installation MySQL

sudo apt-get install mysql-server mysql-client libmysqlclient-dev

=> Enter root user's password MySQL

 

2. Connection to MySQL

mysql -u root -p => Enter password

mysql> show databases;

 

3. Dumb MySQL

mysqldump -u [uname] -p [name_db] > [name_db_backup.sql]

mysqldump -u root -p superprintable_dev > superprintable_backup.sql

Host and Port

mysql -u ebroot -p -h aa1m2od1e5.csymjayx.ap-southeast-1.rds.amazonaws.com -P3306  

 

4. Restore MySQL

mysql -u [uname] -p [db_to_restore] < [backupfile.sql]

mysql -u root -p superprintable_dev < superprintable_backup.sql

 

✨ Have fun :)