MySQL错误2003:无法连接到MySQL服务器上的“本地主机” [英] MySQL Error 2003: Can't connect to MySQL server on 'localhost'

查看:3270
本文介绍了MySQL错误2003:无法连接到MySQL服务器上的“本地主机”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经被给运行依赖MySQL数据库上,具体地,42年3月23日版本的程序的任务。我必须安装的MySQL,运行.batch文件中读取一个SQL文件(创建所需的表等等),然后运行该程序。似乎很简单。

I've been given the task of running a program that relies on a MySQL database, specifically, the 3.23.42 version. I have to install MySQL, run a .batch file that reads an SQL file (to create the required tables and such), then run the program. Seems simple enough.

我得到尽可能安装MySQL。我期待它要求用户名和密码,并这样,因为是我与安装SQL Server和MySQL版本5(或更高版本)的经验,但它需要没有从我这里。试图运行.batch文件,但是,产生错误:

I got as far as installing MySQL. I was expecting it to ask username and passwords and such, as was my experience with installing SQL Server and MySQL version 5 (and later), but it needed nothing from me. Attempts to run the .batch file, however, yields the error:

MySQL错误2003:无法连接到MySQL服务器上的'localhost'。

"MySQL Error 2003: Can't connect to MySQL server on 'localhost' "

于是我就命令提示符管理员,到了MySQL的目录,然后运行mysql的。它给了我同样的错误同上。

So I ran Command prompt as an administrator, went to the MySQL directory, and ran "mysql". It gave me the same error as above.

运行命令的mysqld-NT或mysqld的没有做任何事情,所以我假设还有另外一个问题在这里工作。也没有我发现在正在运行的服务或进程任何'MySQL的。

Running the commands "mysqld-nt" or "mysqld" didn't do anything, so I'm assuming there's another problem at work here. Neither did I find any 'mysql' in the running services or process.

在这一点上,它不会,如果程序运行或没有关系。我需要的数据库,并首先运行。

At this point, it doesn't matter if the program runs or not. I need the database up and running first.

虽然我以前使用的MySQL,我不能说我有那么远的经验,它一直并已经在运行;这是我第一次部署它自己

Although I've used MySQL before, I can't say I have that much experience with it, and it had always been up and running already; this is the first time I'm deploying it myself.

值得注意的是:
我还没有尝试重新安装该程序还没有,虽然我不能肯定是否会解决任何事情。
我已经安装了MyODBC - 05年3月15日,如果它意味着什么(的说明部分)。我使用的是Windows 7中,32位
(听说MySQL不喜欢玩好与Windows 7)。我使用这个设置为服务器和客户端
;曾经的全过程是成功的,我做的另一台计算机上同样的事情。没有电脑实际使用另一个作为服务器。
我并不确切地知道什么样的服务,以查找在服务列表中。

Of note is that: I haven't tried to reinstall the program yet, although I'm not sure if it will fix anything. I've installed MyODBC-3.15.05, if it means anything (part of the instructions). I'm using Windows 7, 32-bit (I have heard MySQL doesn't like to play nice with Windows 7). I'm using this setup as both the server and the client; had the entire process been successful, I was to do the same thing on another computer. No computer actually uses another as a server. I don't exactly know what services to look for in the services list.

有什么我可以做的来解决这个问题?

Is there anything I can do to fix this problem?

感谢。

问候,
Zack_Falcon

Regards, Zack_Falcon

推荐答案

好吧,我不知道到底是什么摆在首位造成这个问题,但我能找到一种方法来解决它。 ,一个有用的,如果老 - 完美在这种情况下 - 教程中,我在网络上发现,希望能够帮助其他有同样的问题。

Well, I don't exactly know what caused this issue in the first place, but I was able to find a way to solve it. A helpful, if old - perfect in this case - tutorial I found on the web, that hopefully can help others with the same problem.

教程:安装MySQL 4.0 - 视窗由Thomas E.博士希克斯
计算机科学系
三一大学

Tutorial: Install MySQL 4.0 - Windows, by Dr. Thomas E. Hicks Computer Science Department Trinity University

链接在这里

这篇关于MySQL错误2003:无法连接到MySQL服务器上的“本地主机”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆