mysql

Backup

mysqldump -u root dbname > backup.sql

Restore

mysql -u root dbname < backup.sql

Commands

# Create database
CREATE DATABASE dbname;

# Create user
CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON dbname.* TO 'user'@'localhost';

Leave a Reply

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