错误2003(HY000):无法连接到'localhost'上的MySQL服务器(10061) - MYSQL命令行连接

时间:2015-06-14 19:15:17

标签: mysql

我正在尝试从命令行运行MYSQL Server,我在执行mysql -u root -p command时遇到上述错误。我尝试按照下面提到的日志纠正问题,但同样的错误又来了。

日志数据:

C:\Program Files\MySQL\MySQL Server 5.5\bin>mysqld -nt --standalone --console
150615  0:30:10 [Warning] option 'new': boolean value 't' wasn't recognized. Set
 to OFF.
150615  0:30:10 [Note] mysqld (mysqld 5.5.44) starting as process 3768 ...
150615  0:30:10 [Note] Plugin 'FEDERATED' is disabled.
150615  0:30:10 InnoDB: The InnoDB memory heap is disabled
150615  0:30:10 InnoDB: Mutexes and rw_locks use Windows interlocked functions
150615  0:30:10 InnoDB: Compressed tables use zlib 1.2.3
150615  0:30:10 InnoDB: Initializing buffer pool, size = 675.0M
150615  0:30:10 InnoDB: Completed initialization of buffer pool
InnoDB: Error: space header page consists of zero bytes in data file C:\MySQL Da
tafiles\ibdata1
150615  0:30:10 InnoDB: Could not open or create data files.
150615  0:30:10 InnoDB: If you tried to add new data files, and it failed here,
150615  0:30:10 InnoDB: you should now edit innodb_data_file_path in my.cnf back

150615  0:30:10 InnoDB: to what it was, and remove the new ibdata files InnoDB c
reated
150615  0:30:10 InnoDB: in this failed attempt. InnoDB only wrote those files fu
ll of
150615  0:30:10 InnoDB: zeros, but did not yet use them in any way. But be caref
ul: do not
150615  0:30:10 InnoDB: remove old data files which contain your precious data!
150615  0:30:10 [ERROR] Plugin 'InnoDB' init function returned error.
150615  0:30:10 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.

150615  0:30:10 [ERROR] Unknown/unsupported storage engine: INNODB
150615  0:30:10 [ERROR] Aborting

150615  0:30:10 [Note] mysqld: Shutdown complete

1 个答案:

答案 0 :(得分:0)

150615  0:30:10 InnoDB: Could not open or create data files.

以管理员用户身份运行mysqld。您可以使用Windows命令runas以管理员身份从控制台运行。