mysql -u root -p
CREATE USER 'username'@'%' IDENTIFIED BY 'password'
GRANT ALL PRIVILEGES ON main.* TO username@'%';
or
GRANT ALL PRIVILEGES ON main.* TO username@'%' IDENTIFIED BY 'password';
mysqldump db_name > backup-db_name.sql
mysqldump -u userNameHere db_name > backup-db_name.sql
mysqldump -u userNameHere -p db_name > backup-db_name.sql
mysql -u {DB-USER-NAME} -p {DB-NAME} < {db.file-name.sql}
mysql -u {DB-USER-NAME} -h {MySQL-SERVER-HOST-NAME} -p {DB-NAME} < {backup.db.file-name.sql}
mysql -e "source /path/to/backup-db.sql" db_name_here
mysql -u DB_USER_NAME -p -e "source /path/to/backup-db.sql" db_name_here