mysql Command Examples

The MySQL command-line tool. More information: https://www.mysql.com/.

mysql {{database_name}}

mysql -u {{user}} --password {{database_name}}

mysql -h {{database_host}} {{database_name}}

mysql --socket {{path/to/socket.sock}}

mysql -e "source {{filename.sql}}" {{database_name}}

mysql --user {{user}} --password {{database_name}} < {{path/to/backup.sql}}

mysql --user {{user}} --password < {{path/to/backup.sql}}