Notes: Using MySQL

Remember:

Replace everything that starts with “a_”.

 

Login to MySQL console.

$ mysql -u root -p

Backup a MySQL database.

$ mysqldump -u a_username a_database > a_file.sql

Restore from backup.

$ mysql -u a_username -p a_database < a_file.sql

Update MySQL user password.

mysql> UPDATE USER.master SET PASSWORD = AES_ENCRYPT('a_password', 
'a_passkey') WHERE username = 'a_username'

It works!

Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *