Mysql服务器启动但无法连接网络问题

时间:2017-07-24 16:26:16

标签: java mysql database

我可以从运行5.7安装程序看到我有一个正在运行的服务器。当我去运行--install时,我得到'安装/删除服务被拒绝!'。我想运行服务器并使用mysqlshow来查看我已正确安装服务器。找到https://dev.mysql.com/doc/refman/5.7/en/can-not-connect-to-server.html并仔细阅读。

我已尝试telnet到端口330上的localhost并获取:

Connecting To localhost...Could not open connection to the host, on port 330: Connect failed

当我查看哪些端口处于打开状态时,我根本看不到330。

我使用了mysqladmin并指定了我正在使用的端口,我确实得到了一个mysqladmin用法的列表,看起来我可以开始写一个表但是我没有连接到服务器所以它都没有用。之后尝试使用mysqlshow并得到:

bin\mysqlshow: Can't connect to MySQL server on 'localhost' (10061)

C:\MYSQL>bin\mysqld --console
2017-07-24T16:17:23.646121Z 0 [Warning] TIMESTAMP with implicit DEFAULT 
value is deprecated. Please use --explicit_defaults_for_timestamp server 
option (see documentation for more details).
2017-07-24T16:17:23.646121Z 0 [Note] --secure-file-priv is set to NULL. 
Operations related to importing and exporting data are disabled
2017-07-24T16:17:23.646121Z 0 [Note] bin\mysqld (mysqld 5.7.19) starting as 
process 3572 ...
2017-07-24T16:17:23.646121Z 0 [ERROR] Can't find error-message file 
'C:\MYSQL\share\errmsg.sys'. Check error-message file location and 'lc-
messages-dir' configuration directive.
2017-07-24T16:17:23.646121Z 0 [Note] InnoDB: Mutexes and rw_locks use 
Windows interlocked functions
2017-07-24T16:17:23.646121Z 0 [Note] InnoDB: Uses event mutexes
2017-07-24T16:17:23.646121Z 0 [Note] InnoDB: _mm_lfence() and _mm_sfence() 
are used for memory barrier
2017-07-24T16:17:23.646121Z 0 [Note] InnoDB: Compressed tables use zlib 
1.2.3
2017-07-24T16:17:23.646121Z 0 [Note] InnoDB: Number of pools: 1
2017-07-24T16:17:23.646121Z 0 [Note] InnoDB: Not using CPU crc32 
instructions
2017-07-24T16:17:23.677544Z 0 [Note] InnoDB: Initializing buffer pool, total 
size = 128M, instances = 1, chunk size = 128M
2017-07-24T16:17:23.693017Z 0 [Note] InnoDB: Completed initialization of 
buffer pool
2017-07-24T16:17:24.640166Z 0 [Note] InnoDB: Highest supported file format 
is Barracuda.
2017-07-24T16:17:27.906296Z 0 [Note] InnoDB: Creating shared tablespace for 
temporary tables
2017-07-24T16:17:27.906296Z 0 [Note] InnoDB: Setting file '.\ibtmp1' size to 
12 MB. Physically writing the file full; Please wait ...
2017-07-24T16:17:30.117639Z 0 [Note] InnoDB: File '.\ibtmp1' size is now 12 
MB.
2017-07-24T16:17:30.351854Z 0 [Note] InnoDB: 96 redo rollback segment(s) 
found. 96 redo rollback segment(s) are active.
2017-07-24T16:17:30.351854Z 0 [Note] InnoDB: 32 non-redo rollback segment(s) 
are active.
2017-07-24T16:17:30.351854Z 0 [Note] InnoDB: Waiting for purge to start
2017-07-24T16:17:33.071230Z 0 [Note] Executing 'SELECT * FROM 
INFORMATION_SCHEMA.TABLES;' to get a list of tables using the deprecated 
partition engine. You may use the startup option '--disable-partition-
engine-check' to skip this check.
2017-07-24T16:17:33.071230Z 0 [Note] Beginning of list of non-natively 
partitioned tables
2017-07-24T16:17:34.880009Z 0 [Note] End of list of non-natively partitioned 
tables

如何才能开始编写可以创建我需要的表格的mysql命令?

1 个答案:

答案 0 :(得分:0)

"C:\Program Files (x86)\MySQL\MySQL Server 5.1\bin\mysqld" --install

如果您不以管理员身份运行 cmd,您将看到安装/删除服务被拒绝!

因此运行提升的命令提示符(开始->cmd->以管理员身份运行)以查看服务已成功安装消息。