Frequently Asked Questions
I am having trouble connecting to a database. It says: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
Try manually setting the socket. The socket depends on how you installed MySQL on your computer. See Where are MySQL's Files? for the socket file location of common installations.
I'm having trouble connecting to a MySQL 4 or MySQL 5 database on localhost with a MAMP install.
My SSH connection gives the error: SSH port forwarding failed and MySQL said: Lost connection to MySQL server at 'reading initial communication packet', system error: 0
On the server, configure MySQL by editing /etc/my.cnf and comment or remove
skip-networking from the
[mysqld] section. Then, restart MySQL Server.
Tips for using the connection screen
- If you enter a database, it will be selected when the connection to the server is established. Otherwise you can select one of the databases on the server afterwards.
- If you enter no port on a standard/SSH connection, Sequel Pro uses the default port for MySQL, port 3306.
- If you enter no SSH port on a SSH connection, Sequel Pro uses the default port for SSH, port 22.
- In case you already have a SSH key saved on the remote machine, you can leave the SSH password field empty. Sequel Pro will create the SSH tunnel using that key.
- Click "'Add to Favorites"' to save the connection for use next time you open Sequel Pro. Passwords are stored in the Keychain. To re-order favourites click the pencil in the bottom left of the connection window, (or choose Preferences > Favorites from the Sequel Pro menu) then drag the favourites in the list.
- You can connect to multiple databases simultaneously by opening a new window (File > New) or ⌘ + N
Working with Data
How do I open an *.sql file for use with my database?
To import an SQL dump file using the most recent version of Sequel Pro, connect to your MySQL host and select a database, then choose 'Import...' from the File menu. This will bring up a dialog box, select the file on your file system that you would like to import, then choose SQL from the "Format:" drop down menu and click "Open". Your database will now be updated. Click the Table refresh button if needed. Careful: Importing a *.sql file may overwrite your existing data!
How do I save the table structure/table contents as an *.sql file
To export an SQL dump file of the table structure or contents you must first be connected a mysql host and have a database selected. Next, choose Export > MySQL Dump... from the File menu. This will bring up a dialog box where you can choose what tables you would like to export.
How do I create an enum field in a table?
To create an enum field follow the same procedure as you would for any other field, choose enum in the Type column of the Table Structure form, and then in the Length column enter the enum values as comma separated quoted strings. If you wish to use a default value, you should enter it without quotes in the Default column.
Is there a shortcut for running a Query?
If you press cmd + R it will run all the commands in the Query view.
If you press cmd + opt + R it will run either the currently selected text as a query OR the entire query in which you are currently positioned.
Where does Sequel Pro store the connections?
The connections strings are stored in the following preference file:
The passwords are stored in the Mac OSX Keychain, which is stored here:
Find more info about the Keychain here: http://nevali.net/post/122592107/managing-the-mac-os-x-keychain.
The ~/Library folder is invisible in Lion, to open it choose "Go To Folder…" (cmd-shift-G) and type "~/Library/Preferences/" to open the preference folder.
How do I change my root password?
Run the following query in the Custom Query tab:
SET PASSWORD = PASSWORD('parrot');
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 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 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;
How do I get commit access to Sequel Pro?
We are happy to give commit access to any developer who has shown that they can submit patches of clean code.
What version of XCode do I need?
XCode 4 is used for official builds of Sequel Pro. For development Xcode 4,5 and 6 are supported.
I want to report a bug I found in the translate.sequelpro.com web app
Please drop us a line and include detailed steps on how to reproduce the bug where possible.
Is there a place where I can talk to other translators working in my language?
We don't currently have a forum for general discussion of localization but it is possible to leave comments against each individual translation.
Will you be translating into language X?
Is Postgresql going to be supported?
We have already chosen a Postgresql framework to use for integrating into Sequel Pro and work has begun. We will announce our progress as we reach more significant milestones.