楼上的方法我试过了,但运行了net start mysql 后提示:系统发生3错误,系统找不到指定的路径,去服务管理器中查看,mysql服务的“可执行文件的路径”栏为空,而且不可手动填写!
换一个安装目录,在C:\Mysql下面试试。
Microsoft Windows XP [版本 5.1.2600] (C) 版权所有 1985-2001 Microsoft Corp. C:\Documents and Settings\sunshine>cd c:\mysql\bin C:\mysql\bin>mysql -u root ERROR 2013: Lost connection to MySQL server during query C:\mysql\bin>mysql ERROR 2013: Lost connection to MySQL server during query C:\mysql\bin>mysqld --skip-name-resolve Can't start server: Bind on TCP/IP port: No error 040713 15:46:26 Do you already have another mysqld server running on port: 3306 ? 040713 15:46:26 Aborting 040713 15:46:26 mysqld: Shutdown Complete C:\mysql\bin>mysqld-nt --skip-name-resolve Can't start server: Bind on TCP/IP port: No error 040713 15:46:51 Do you already have another mysqld server running on port: 3306 ? 040713 15:46:51 Aborting 040713 15:46:51 mysqld-nt: Shutdown Complete C:\mysql\bin>mysql ERROR 2013: Lost connection to MySQL server during query C:\mysql\bin>mysqld -remove Failed to remove the service because the service is running Stop the service and try again C:\mysql\bin>mysqld shutdown Can't start server: Bind on TCP/IP port: No error 040713 15:47:55 Do you already have another mysqld server running on port: 3306 ? 040713 15:47:55 Aborting 040713 15:47:55 mysqld: Shutdown Complete C:\mysql\bin>mysqld -remove Failed to remove the service because the service is running Stop the service and try again C:\mysql\bin>net start mysql 请求的服务已经启动。 请键入 NET HELPMSG 2182 以获得更多的帮助。 C:\mysql\bin>mysql ERROR 2013: Lost connection to MySQL server during query C:\mysql\bin>mysqld --skip-name-resolve Can't start server: Bind on TCP/IP port: No error 040713 15:48:35 Do you already have another mysqld server running on port: 3306 ? 040713 15:48:35 Aborting 040713 15:48:35 mysqld: Shutdown Complete C:\mysql\bin>net stop mysql MySQL 服务正在停止... MySQL 服务已成功停止。 C:\mysql\bin>mysqld C:\mysql\bin>mysql ERROR 2003: Can't connect to MySQL server on 'localhost' (10061) C:\mysql\bin>mysqld --skip-name-resolve Microsoft Windows XP [版本 5.1.2600] (C) 版权所有 1985-2001 Microsoft Corp. C:\Documents and Settings\sunshine>cd c:\mysql\bin C:\mysql\bin>mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 to server version: 4.0.20a-debug Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> exit Bye C:\mysql\bin>mysql Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 to server version: 4.0.20a-debug Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> exit Bye C:\mysql\bin>
(C) 版权所有 1985-2001 Microsoft Corp.
C:\Documents and Settings\sunshine>cd c:\mysql\bin
C:\mysql\bin>mysql -u root
ERROR 2013: Lost connection to MySQL server during query
C:\mysql\bin>mysql
ERROR 2013: Lost connection to MySQL server during query
C:\mysql\bin>mysqld --skip-name-resolve
Can't start server: Bind on TCP/IP port: No error
040713 15:46:26 Do you already have another mysqld server running on port: 3306
?
040713 15:46:26 Aborting
040713 15:46:26 mysqld: Shutdown Complete
C:\mysql\bin>mysqld-nt --skip-name-resolve
Can't start server: Bind on TCP/IP port: No error
040713 15:46:51 Do you already have another mysqld server running on port: 3306
?
040713 15:46:51 Aborting
040713 15:46:51 mysqld-nt: Shutdown Complete
C:\mysql\bin>mysql
ERROR 2013: Lost connection to MySQL server during query
C:\mysql\bin>mysqld -remove
Failed to remove the service because the service is running
Stop the service and try again
C:\mysql\bin>mysqld shutdown
Can't start server: Bind on TCP/IP port: No error
040713 15:47:55 Do you already have another mysqld server running on port: 3306
?
040713 15:47:55 Aborting
040713 15:47:55 mysqld: Shutdown Complete
C:\mysql\bin>mysqld -remove
Failed to remove the service because the service is running
Stop the service and try again
C:\mysql\bin>net start mysql
请求的服务已经启动。
请键入 NET HELPMSG 2182 以获得更多的帮助。
C:\mysql\bin>mysql
ERROR 2013: Lost connection to MySQL server during query
C:\mysql\bin>mysqld --skip-name-resolve
Can't start server: Bind on TCP/IP port: No error
040713 15:48:35 Do you already have another mysqld server running on port: 3306
?
040713 15:48:35 Aborting
040713 15:48:35 mysqld: Shutdown Complete
C:\mysql\bin>net stop mysql
MySQL 服务正在停止...
MySQL 服务已成功停止。
C:\mysql\bin>mysqld
C:\mysql\bin>mysql
ERROR 2003: Can't connect to MySQL server on 'localhost' (10061)
C:\mysql\bin>mysqld --skip-name-resolve
Microsoft Windows XP [版本 5.1.2600]
(C) 版权所有 1985-2001 Microsoft Corp.
C:\Documents and Settings\sunshine>cd c:\mysql\bin
C:\mysql\bin>mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 4.0.20a-debug
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> exit
Bye
C:\mysql\bin>mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 4.0.20a-debug
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> exit
Bye
C:\mysql\bin>