Documentation

MySQL Reference

We have put together some easy to use notes for using MySQL with Sequel Pro.

The official documentation for MySQL is at dev.mysql.com and you can get specific information about the MySQL server version you are running:

 

Frequently Asked Questions

How do I change my root password?

Run the following query in the Custom Query tab: 

 SET PASSWORD = PASSWORD('parrot'); 

How do I import files using the MySQL command line

Type Password at a Prompt

 

mysql -h 127.0.0.1 -u db_user -p db_name < import_file.sql 

 

Include Password in Command

 

mysql -h 127.0.0.1 -u db_user -psecretpassword db_name < import_file.sql 

How do I export files using the MySQL command line

Type Password at the Prompt

 

mysqldump -h 127.0.0.1 -u db_user -p db_name > import_file.sql 

 

Include Password in Command

 

mysqldump -h 127.0.0.1 -u db_user -psecretpassword db_name > import_file.sql 

 

How much space does my MySQL database take up?

You can run the following command to get a list of the databases on your server and the size in MB they are consuming:

SELECT table_schema "My databases", sum( data_length + index_length ) / 1024 / 1024 "Size (MB)" FROM information_schema.TABLES GROUP BY table_schema;

Articles