MySQL command-line client Commands Connect to MySQL server using mysql command-line client with a username and password (MySQL will prom...
MySQL command-line client Commands
Connect to MySQL server using mysql command-line client with a username and password (MySQL will prompt for a password):
Code language: SQL (Structured Query Language) (sql)mysql -u [username] -p;
Connect to MySQL Server with a specified database using a username and password:
Code language: SQL (Structured Query Language) (sql)mysql -u [username] -p [database];
Exit mysql command-line client:
Code language: SQL (Structured Query Language) (sql)exit;
Export data using mysqldump tool
Code language: SQL (Structured Query Language) (sql)mysqldump -u [username] -p [database] > data_backup.sql;
To clear MySQL screen console window on Linux, you use the following command:
Code language: SQL (Structured Query Language) (sql)mysql> system clear;
COMMENTS