简体   繁体   English

无法使用 Navicat 连接到 mySQL

[英]Can't connect to mySQL with Navicat

Please, I just migrated from Windows to Mac recently.拜托,我最近刚从 Windows 迁移到 Mac。 I installed XAMPP on my mac and also installed PHP and MySQL using Homebrew on my mac.我在我的 mac 上安装了 XAMPP,还在我的 mac 上使用 Homebrew 安装了 PHP 和 MySQL。 I can easily connect to the MySQL from homebrew using the Navicat if I start it using the command brew services start mysql如果我使用命令brew services start mysql启动它,我可以使用 Navicat 从自制软件轻松连接到 MySQL

But, the problem is if I stop the brew service and start my XAMPP, I can't connect to MySQL.但是,问题是如果我停止 brew 服务并启动我的 XAMPP,我将无法连接到 MySQL。 I can easily connect with phpMyAdmin web, but with Navicat, it keeps throwing error that it can't connect to the localhost .我可以轻松地连接到 phpMyAdmin 网站,但是使用 Navicat,它不断抛出无法连接到localhost

I tried looking up the port the MySQL is running and it is 3306 .我尝试查找 MySQL 正在运行的port ,它是3306 But using host=localhost , username=root , password=<empty> , port=3306 but I still get the error.但是使用host=localhost , username=root , password=<empty> , port=3306但我仍然收到错误消息。

Any help is appreciated.任何帮助表示赞赏。

I know the post is old, but I still think it's useful to come up with solutions anyway.我知道这篇文章很旧,但我仍然认为提出解决方案很有用。 I'm using MAMP and I just had a configuration problem, to allow access to MySQL.我正在使用 MAMP,但我遇到了配置问题,无法访问 MySQL。

When I checked "Allow network access to MySQL", it was OK for me.当我选中“允许网络访问 MySQL”时,对我来说没问题。

Hope it helps someone.希望它可以帮助某人。

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM