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:30

You need to run the server first. The command you use (in the question) starts a client to connect to the server but the server is not there so there the error.

Since I am not a Windows user (Linux comes equipped) so I might not be the best person to tell you how but I can point to you to a guide and another guide that show you how to get MySQL server up and running in Windows.

After you get that running, you can use the command (in the question) to connect it.

NOTE: You may also try http://www.apachefriends.org/en/xampp.html if you plan to use MySQL for web database development.

Hope this helps.

查看更多
劳资没心,怎么记你
3楼-- · 2019-03-08 16:32

You also need to configure and start the MySQL server. This will probably help

查看更多
Explosion°爆炸
4楼-- · 2019-03-08 16:32
  1. Run the command prompt as admin and cd to bin directory of MySQL

    Generally it is (C:\Program Files\MySQL\mysql-5.6.36-winx64\bin)
    
  2. Run command : mysqld --install. (This command will install MySQL services and if already services already installed it will prompt.)
  3. Run below commands to start and stop server

    To start : net start mysql

    To stop : net stop mysql

  4. Run mysql command.

  5. Enjoy !!

查看更多
Summer. ? 凉城
5楼-- · 2019-03-08 16:34

I tried following steps to run mysql server 5.6 on my windows 8.

  1. Run command prompt as an administrator
  2. go mysql server 5.6 installation directory (in my case: C:\Program Files (x86)\MySQL\MySQL Server 5.6\bin) copy that location
  3. In Command prompt run "cd C:\Program Files (x86)\MySQL\MySQL Server 5.6\bin"
  4. run "mysql -u root"
查看更多
Root(大扎)
6楼-- · 2019-03-08 16:34

Start mysql server by command prompt

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

Or alternative reach up to bin then

mysqld --console

It will start your server.

If you have mysql command line client available

click on it

it show enter your password :

Please enter your password.

Then you can access it.

查看更多
登录 后发表回答