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

问题描述:

我想从命令行运行MYSQL服务器,并且执行mysql -u root -p command时出现上述错误。我试图纠正下面提到的日志后面的问题,但同样的错误再次出现。错误2003(HY000):无法连接到'localhost'(10061)上的MySQL服务器 - MYSQL命令行连接

LOG DATA:

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 

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

运行mysqld作为管理员用户。您可以使用windows命令runas作为管理员从控制台运行。

+0

我试图以管理员用户身份从/ bin运行mysqld服务,同时连接到服务器时再次出现错误。这是MySQL 5.6版的错误吗?我不确定。 – Prady