How to start MySQL server on windows xp

2019-03-08 15:37发布

Whenever I try to start MySQl by typing:

> mysql -u root

I'm getting an error:

ERROR 2003(HY000): Can't connect to MySQL server on 'localhost' (10061)

How can I solve above problem? I just downloaded MySQL and unzipped in E drive, I have not done anything. Do I have to make connection first? if yes, how can I do?

17条回答
家丑人穷心不美
2楼-- · 2019-03-08 16:16

there is one of the best solution do resolve this problem and it is going to work 100%. as we know that server is a process so treat it like a process go to the task manager in windows and see for services in task manager in that service see for Mysql and MS80 and try to start it manually by click on it and say run then will take some time.

go to your mysql workbench and click on start/shutdown then try to refresh the server status in server status option. it will load up thats it.

查看更多
聊天终结者
3楼-- · 2019-03-08 16:23

Type

C:\> "C:\Program Files\MySQL\MySQL Server 5.1\bin\mysqld" --console

to start the sql server and then test the client connection.

查看更多
仙女界的扛把子
4楼-- · 2019-03-08 16:23

I was using MySQL Server 5.5 as a result I was missing the folder which majority of the answers made mention of in the bin folder. What I did instead was the following:

  1. Open Explorer and make your way to C:\Program Files\MySQL\MySQL Server 5.5\bin or your MySQL installation directory.
  2. Run the executable application MySQLInstanceConfig and follow the images below.

This solved my issue and I was able to access the database without any errors.

查看更多
Explosion°爆炸
5楼-- · 2019-03-08 16:24

maybe

E:\mysql-5.1.39-win32\bin>mysql -u root -p
查看更多
叼着烟拽天下
6楼-- · 2019-03-08 16:27

If the command prompt does not work in Windows, try the following:

1) Open services in Windows.

2) Then check the status for Mysql and if you found status nothing or blank then start the mysql service.

MYSQL SERVICE STATUS ON Windows service manager

3) After then see whether the mysql is start or not .If it shows started then try to check mysql working.

It has worked for me when cmd commands were not working.

查看更多
不美不萌又怎样
7楼-- · 2019-03-08 16:28

The MySQL server can be started manually from the command line. This can be done on any version of Windows.

To start the mysqld server from the command line, you should start a console window (or “DOS window”) and enter this command:

shell> "C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqld"
The path to mysqld may vary depending on the install location of MySQL on your system.

You can stop the MySQL server by executing this command:

shell> "C:\Program Files\MySQL\MySQL Server 5.0\bin\mysqladmin" -u root shutdown

**Note : **

If the MySQL root user account has a password, you need to invoke mysqladmin with the -p option and supply the password when prompted.

This command invokes the MySQL administrative utility mysqladmin to connect to the server and tell it to shut down. The command connects as the MySQL root user, which is the default administrative account in the MySQL grant system. Note that users in the MySQL grant system are wholly independent from any login users under Windows.

If mysqld doesn't start, check the error log to see whether the server wrote any messages there to indicate the cause of the problem. The error log is located in the C:\Program Files\MySQL\MySQL Server 5.0\data directory. It is the file with a suffix of .err. You can also try to start the server as mysqld --console; in this case, you may get some useful information on the screen that may help solve the problem.

The last option is to start mysqld with the --standalone and --debug options. In this case, mysqld writes a log file C:\mysqld.trace that should contain the reason why mysqld doesn't start. See MySQL Internals: Porting to Other Systems.

Via MySQL Official Page

查看更多
登录 后发表回答