Command
mysqlExplanation
Connect to MySQL server using the command-line client.
Examples
Connect as root user
mysql -u root -pConnect to specific database
mysql -h localhost -u user -p database_nameExecute SQL file
mysql -u user -p < script.sqlmysqlConnect to MySQL server using the command-line client.
Connect as root user
mysql -u root -pConnect to specific database
mysql -h localhost -u user -p database_nameExecute SQL file
mysql -u user -p < script.sql