Search code examples
mysqlphpmyadminmampmamp-prosequelpro

Unable to find or create new databases using Sequel Pro, but can using phpmyadmin


I am using MAMP Pro and I am having an issue where I cannot find existing databases on Sequel Pro, nor can I create new databases. However, on phpmyadmin, I can see and edit the existing databases and create new ones without any issue. I believe the issue lies with the mysql version on Sequel Pro. Screenshot of phpmyadmin, MAMP Pro and Sequel Pro

As you can see, on the left, phpmyadmin is running on the MySql server version 5.6.35, as is MAMP Pro, which is in the center of the image. However, Sequel Pro, at the bottom of the image, is running on MySql server version 5.7.18.

I really appreciate any help that can be given, I am close to tearing my hair out!

Thank you!


Solution

  • Clearly the problem is that you're connecting to two different MySQL instances.

    Unless you have a good reason to run two MySQL servers on your computer, you should consolidate the databases and remove one. That way you don't get confused when trying to connect. Perhaps you had MAMP installed and also installed another MySQL server; or vice versa. Be careful not to remove the datadir from the MySQL server you're using though, and take backups before you do anything. That's aside from the actual problem, anyway.

    You can use the STATUS SQL command to see the connection information — it looks like Sequel Pro is connected via a socket, and STATUS will tell you the path to the socket. Run the command from phpMyAdmin as well to see how it's connecting (it's going to be socket or TCP/IP networking); you can the configure Sequel Pro to connect using the same connection settings phpMyAdmin is using. You could, if you really wanted to, run multiple MySQL instances alongside each other and configure your clients to connect to the proper one (phpMyAdmin at least allows connecting to multiple servers, I assume Sequel pro does as well). You'd use either a different socket or different network port numbers for each server instance — as well as a different datadir for each, since MySQL would not deal well with sharing the data between different versions of the server, especially if they're running concurrently.

    To summarize, tell Sequel Pro to connect using the same settings phpMyAdmin is using.

    EDIT:

    You've determined that MAMP and phpMyAdmin are connecting via the socket /Applications/MAMP/tmp/mysql/mysql.sock — which means they're using the MySQL installed by MAMP (presumably you've installed another MySQL server independently of that). From the Sequel Pro "QUICK CONNECT" page, click over to the "Socket" tab and enter the correct socket like so:

    Sequel Pro connection window

    I believe the "Name" field can be anything you prefer, although I don't really know this software program.

    If you every use other software, try to remember that '127.0.0.1' and 'localhost' are two very different things to MySQL; the first one always implies using TCP/IP networking and the latter uses sockets (Sequel Pro seems to deal correctly with it so it's not relevant on this connection screen). You, of course, want 'localhost' since you're using sockets.