top of page
Writer's picturebeCloudReady Team

MySQL Commands with examples

Updated: Feb 14

Some handy MySQL commands that I have learned over the years


Connect to MySQL server and execute SQL query
mysql -u username -p -h db_name.becloudready.com skucaster -e "SELECT * from forecasting"

MySQL Dump for Regular size DB
mysqldump -h db_name.becloudready.com --user="bcr" -p skucaster > skucaster.sql

If you are getting below error while getting the dump

mysqldump: Got error: 1044: Access denied for user 'bcr'@'%' to database 'skucaster' when using LOCK TABLES

MySQL Dump for Large database
 mysqldump -h db_name.becloudready.com --quick --max_allowed_packet=512M --lock-tables=false --user="bcr" -p skucaster > skucaster.sql

List the processes running in the MySQL server
show processlist;
SHOW STATUS WHERE `variable_name` = 'Threads_connected';

To see a more complete list you can run:

show session status;
status

12 views0 comments

Recent Posts

See All

Comments


bottom of page