帮助运行 MySQL。 SQL yog 给出错误 HY000): 无法连接到“localhost”上的 MySQL 服务器(10061)
大家好,我的系统中安装了 mysql,当我右键单击系统中的 apache 图标时,选择服务 MySql 并启动它,它说
windows could not start the MySql service on local computer the system cannot find the path specified
,当我这样做时,
C:\Users\User>mysql -u root
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)
任务管理器中没有运行 mysql。我肯定已经安装了 mysql 因为 当我这样做
C:\Users\User>mysql --version
mysql Ver 14.14 Distrib 5.1.50, for Win32 (ia32)
并且当我尝试通过从安装目录运行 MySQLInstanceConfig.exe 来配置我的 sql 时。它说
名为 MySql 的 Windows 服务已存在。请
正确卸载服务或 为该选择一个不同的名称 服务
我的 php 使用 zend 框架,php 运行良好。
任何帮助表示赞赏!
hi guys i have mysql installed in my system, when i right click on apache icon in the system select the service MySql and start it, it says
windows could not start the MySql service on local computer the system cannot find the path specified
and when i do
C:\Users\User>mysql -u root
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)
no mysql is running in the task manager. i have definetly have mysql installed coz
when i do
C:\Users\User>mysql --version
mysql Ver 14.14 Distrib 5.1.50, for Win32 (ia32)
And when i try to configure my sql by running MySQLInstanceConfig.exe from install directory. it says
A windows service by the name of MySql already exists. Please
uninstall the service correctly or
choose a different name for the
service
Using zend framework for my php, php is running fine.
Any help is appreciated!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
有可能是因为您在尝试连接时没有显式指定主机,MySQL 会尝试使用 localhost 但无法正确解析。尝试明确指定主机作为环回地址。
试试这个:
mysql -h127.0.0.1 -uroot
您可能会收到拒绝连接的错误,因为您没有提供密码。如果是这种情况,只需将其添加到命令末尾:
mysql -h127.0.0.1 -uroot -pYOUR_PASSWORD
Chances are that because you're not explicitly specifying a host when you attempt to connect, MySQL is attempting to use
localhost
but it is not resolving properly. Try explicitly specifying the host as your loopback address.Try this:
mysql -h127.0.0.1 -uroot
You might get an error denying your connection because you're not giving a password. If that's the case, just add it to the end of the command:
mysql -h127.0.0.1 -uroot -pYOUR_PASSWORD
第一个错误说明了一切 - MySQL 无法启动。因此,没有任何东西监听各个连接点,因此客户端无法连接。
检查文件/位置的服务定义是否与 MySQL 的实际安装位置相匹配。 MySQL 是单独安装的,还是作为 WAMP/XAMP 等软件包的一部分安装的?如果打包版本安装错误,那就很奇怪了。
The first error says it all - MySQL could not start up. Therefore there's nothing listening to the various connection points so the client can't connect.
Check that the service's definition for files/locations matches where your MySQL is actually installed. Did you install MySQL separately, or as part of a package like WAMP/XAMP? It'd be very odd if the packaged version was mis-installed.
尝试浏览到您的 mysql 安装目录并运行 mysqld.exe 看看是否有效,然后如果有效则 mysql 没有作为服务运行
mysqld.exe 是服务(Linux 上的守护进程)或服务器程序(如果您不提供服务)
mysql.exe是mysql连接客户端
Trying browsing to your mysql install directory and running mysqld.exe see if works then if it does mysql was not running as a service
mysqld.exe is the service (deamon on linux) or the server program if you dont service it
mysql.exe is the mysql connection client