添加连接时MySQL Workbench错误

时间:2022-04-09 01:30:43

I'm new to mac and mySQL. I installed mySQL 5.6.14 and mySQLWorkbench 1.6. I turned on mySQL in system preferences.

我是mac和mySQL新手。我安装了mySQL 5.6.14和mySQLWorkbench 1.6。我在系统首选项中打开了mySQL。

Then I went into workbench, clicked to add a new connection and filled in the details: host is localhost; username is root; password is empty/nothing. Tested the connection and its all good.

然后我进入workbench,单击添加一个新连接,并填写细节:host是localhost;用户名是根;密码为空/没有。测试了连接和它的所有好处。

Clicked OK and got this error: Exception caught while processing action from home screen: error calling Python module function WbAdmin.autoDetectLocalInstance.

单击OK并获得此错误:在从主屏幕处理操作时捕获的异常:调用Python模块函数WbAdmin.autoDetectLocalInstance的错误。

I also can not access mySQL from the terminal.

我也不能从终端访问mySQL。

I've googled and can't find anything. Has anyone got any ideas of what could be wrong something I could try to fix it.

我用谷歌搜索过,什么都找不到。有没有人知道哪里出了问题?我可以试着解决它。

3 个解决方案

#1


1  

I've had de same problem. For me the solution:

我也遇到过同样的问题。对我来说,解决方案:

Check that you have the file /etc/my.cnf if you don't have sudo cp my-default.cnf on the terminal

如果在终端上没有sudo cp my-default.cnf,请检查是否有/etc/my.cnf文件

Try to put password Virlli$ sudo /usr/local/mysql/bin/mysqladmin -u root password 'password'

尝试输入密码Virlli$ sudo /usr/local/mysql/bin/mysqladmin -u root密码'password'

Restart Mysql and Workbench

重新启动Mysql和工作台

for Mysql :sudo /usr/local/mysql/support-files/mysql.server stop

Mysql:sudo /usr/local/mysql/support-files / Mysql。服务器停止

#2


1  

If you are a mac your default password is root . Same as the username.

如果你是mac,你的默认密码是root。与用户名相同。

#3


1  

I've had the same problem. I solved this issue by getting settings section from main window and then connecting from appeared connection from the main window.

我也遇到过同样的问题。我从主窗口获取settings部分,然后从主窗口连接到appear connection,从而解决了这个问题。

#1


1  

I've had de same problem. For me the solution:

我也遇到过同样的问题。对我来说,解决方案:

Check that you have the file /etc/my.cnf if you don't have sudo cp my-default.cnf on the terminal

如果在终端上没有sudo cp my-default.cnf,请检查是否有/etc/my.cnf文件

Try to put password Virlli$ sudo /usr/local/mysql/bin/mysqladmin -u root password 'password'

尝试输入密码Virlli$ sudo /usr/local/mysql/bin/mysqladmin -u root密码'password'

Restart Mysql and Workbench

重新启动Mysql和工作台

for Mysql :sudo /usr/local/mysql/support-files/mysql.server stop

Mysql:sudo /usr/local/mysql/support-files / Mysql。服务器停止

#2


1  

If you are a mac your default password is root . Same as the username.

如果你是mac,你的默认密码是root。与用户名相同。

#3


1  

I've had the same problem. I solved this issue by getting settings section from main window and then connecting from appeared connection from the main window.

我也遇到过同样的问题。我从主窗口获取settings部分,然后从主窗口连接到appear connection,从而解决了这个问题。