use*_*260 17 mysql mysql-workbench
无法连接到Mac上的MySQL Workbench.我收到以下错误:无法连接,服务器可能没有运行.无法连接到'127.0.0.1'上的MySQL服务器(61)我们将不胜感激.
谢谢!
app*_*ces 36
遇到类似的问题,我的问题是MySQL安装自己配置为在非默认端口上运行.我不知道原因,但要找出运行MySQL的端口,请在MySql客户端中运行以下命令:
SHOW GLOBAL VARIABLES LIKE 'PORT';
Run Code Online (Sandbox Code Playgroud)
Mil*_*Roo 27
转到系统首选项 - > MySql并检查MySql实例的状态.
小智 11
如果您无法使用MySQL-workbench连接到MAC OS X MySQL服务器,则可能有一个或多个原因.
当您按"测试连接"时,您可能会看到此错误.如果您逐步执行"配置服务器管理",可以简要解释这一点.在红色十字架的基础上,您可以过滤掉真正的问题.
The most common problems are associated with the installation of MySQL-server. Few people either forget to install the server prior to installing MySQL-workbench. Some others would install a part of the product. Please check whether you have also installed all the 3 parts that comes with the MySQL-Server dmg(disk image) file which contains mysql-server package. Those 3 parts are: MySQL server, preference pane and startup item.
Note: If you haven't selected preference pane then you won't be able to start mysql server instance from the System preferences.
After you make sure that you have installed each item then you can check server instance of your native mysql-server. Open System preferences from dock and click MySQL. Then click Start MySQL Server to start the server instance. If the server instance is stopped, then MySQL-workbench won't be able to connect to the MySQL server.
If you are still facing issue, then you need to check the port of the connection which you are making. Default port is '3307' and NOT '3306'. You can check it with using the following command in mysql terminal:
SHOW GLOBAL VARIABLES LIKE 'PORT';
Run Code Online (Sandbox Code Playgroud)
请注意,此过程可帮助您连接到本地实例.如果必须连接到远程服务器,则必须输入该特定IP和端口.如果您遇到此问题,请与服务器的管理员联系.由于此问题明确指出问题与连接到本地实例有关,因此我不会编写您可能需要确保的检查.
这一步都在终端里:) ->source
须藤/usr/local/mysql/support-files/mysql.server 启动
/usr/local/mysql/bin/mysql -v
光盘;纳米 .bash_profile
粘贴并保存:
导出路径="/usr/local/mysql/bin:$PATH"
“第一个命令将您带到您的主目录并打开 .bash_profile 文件或创建一个新文件(如果它不存在),然后添加上面的行,将 mysql 二进制路径添加到您可以运行的命令中。退出文件输入“control + x”,并在提示时输入“y”保存更改。这里要做的最后一件事是重新加载外壳以使上述内容立即生效。”
源 ~/.bash_profile mysql -v
“您将再次获得版本号,只需键入“q”即可退出。”
在你的终端输入:mysql
进而
显示全局变量,如“端口”;
每次在 mysql 客户端(shell)中使用分号!
现在您知道您的端口以及您可以在何处配置您的服务器(在带有 mysql shell/client 的终端中)。但是要成功连接 MySQL Benchmark 或其他客户端,您必须了解更多信息。用户名、密码主机名和端口。安装后,root 用户没有密码,因此使用 mysql shell/client 在终端中设置(howtoSetPW)密码。并且服务器在本地运行。所以输入root,你的PW,本地主机和3007。玩得开心!
尝试重新启动 mysql 或启动它(如果尚未启动)。在终端中输入此内容。
mysql.server restart
要自动启动,请访问以下链接:
如何在 OS X Yosemite / El Capitan 上启动时自动加载 MySQL
归档时间: |
|
查看次数: |
87068 次 |
最近记录: |