DBngin
DBngin copied to clipboard
Can’t connect to MySQL server on 127.0.0.1 (61)
Please fill out the detail below, it helps me investigate the bug:
-
Driver (Ex: PostgreSQL 10.0): MySQL 8.0.27 port 3307 or 3306 ( tried both)
-
DBngin build number: 6.4
-
macOS version: Ventura 13.2.1
-
The steps to reproduce this issue: Start Up MySQL, then open try to open database in TablePlus or SEQUEL Ace
After updating Homebrew and fixing some permissions for brew cleanup files, I try to access this database and get this error: "Can’t connect to MySQL server on 127.0.0.1 (61)".
I have tried just creating a new MySQL 8.0.27 database and opening in TablePlus and that works. Is there a way to recover the database files from the other DB that keeps throwing that error?
I got able to make it work by doing the following:
Create a my.cnf file wherever you want with the following content:
[mysqld]
sql_mode = "STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION"
default_authentication_plugin = mysql_native_password
port = 3306
Then go to DBngin and set that configuration file in the connection settings. Once I did this, it got fixed but then I got another error regarding the authentication driver once connected. What I needed to do is the following:
Go to the terminal and then type the following:
mysql --socket=/tmp/mysql_3306.sock -u root
Once you're connected, you need to execute the following commands:
ALTER USER 'root'@'localhost' IDENTIFIED BY '';
FLUSH PRIVILEGES;
Then try connecting again using the above command and it should work.
Hope this is helpful for anyone suffering this error.
https://github.com/TablePlus/DBngin/issues/102#issuecomment-1666075720