mysql启动错误
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mysql启动错误相关的知识,希望对你有一定的参考价值。
参考技术A Microsoft Windows [版本 6.1.7601]版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
C:\Users\Administrator>cd /d "C:\Program Files\mysql\MySQL Server 5.7\bin"
C:\Program Files\MySQL\MySQL Server 5.7\bin>mysqld -install
Service successfully installed.
C:\Program Files\MySQL\MySQL Server 5.7\bin>net start mysql
MySQL 服务正在启动 ..
MySQL 服务无法启动。
服务没有报告任何错误。
请键入 NET HELPMSG 3534 以获得更多的帮助。
/*查看windows日志是因为
Fatal error:
Can't open and lock privilege tables: Table 'mysql.user' doesn't exist */
C:\Program Files\MySQL\MySQL Server 5.7\bin>mysql -u root -p
Enter password:
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)
C:\Program Files\MySQL\MySQL Server 5.7\bin>mysqld --initialize --user=mysql --console
2017-12-25T14:47:42.131665Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timesta
mp server option (see documentation for more details).
2017-12-25T14:47:42.147265Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
2017-12-25T14:47:42.163865Z 0 [ERROR] Aborting
//将data文件夹里的文件全部清空后,再执行命令
C:\Program Files\MySQL\MySQL Server 5.7\bin>mysqld --initialize --user=mysql --console
2017-12-25T14:48:30.765017Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timesta
mp server option (see documentation for more details).
2017-12-25T14:48:41.833846Z 0 [Warning] InnoDB: New log files created, LSN=45790
2017-12-25T14:48:43.839051Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2017-12-25T14:48:44.512253Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has
been started. Generating a new UUID: b4b8e0ab-e982-11e7-b303-00ff2ee04b9c.
2017-12-25T14:48:44.605854Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2017-12-25T14:48:55.834683Z 1 [Note] A temporary password is generated for root@localhost: Xg2huGprf*C&
//这个Xg2huGprf*C&密码等会儿要用。
C:\Program Files\MySQL\MySQL Server 5.7\bin>
C:\Program Files\MySQL\MySQL Server 5.7\bin>net start mysql
MySQL 服务正在启动 ...
MySQL 服务已经启动成功。
C:\Program Files\MySQL\MySQL Server 5.7\bin>mysql -u root -p
Enter password: ************
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.18
Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> set password=password('root')
->
Mysql 启动 mysql 的未知错误和启动 apache 的未知错误的问题
【中文标题】Mysql 启动 mysql 的未知错误和启动 apache 的未知错误的问题【英文标题】:problem with Mysql Unknown error starting mysql and Unknown error starting apache 【发布时间】:2021-04-05 16:22:44 【问题描述】:我对所有版本的 bitnami 都有问题。当我关闭或重新启动我的电脑时,WAMP 无法连接 MySQL。我关闭了Skype,但仍然有同样的问题。我也改用XAMPP,但关机时问题仍然存在。最后,我恢复到bitnami,我仍然有同样的问题。我已经观看了所有故障排除视频并执行了一些操作,例如将端口更改为 3307,但我无法解决此问题。
这是我从 bitnami 收到的消息:
Stderr:
Unknown error starting mysql
Starting Apache Web Server...
Exit code: 1
Stdout:
Stderr:
Unknown error starting apache
【问题讨论】:
【参考方案1】:你能试试这个吗? 1.- 转到控制面板-> 管理工具-> 服务, 2.- 找到网络部署服务并停止它。 3.- 在bitnami中启动apache服务器
您可以通过控制台检查它是否正在使用的端口, 1.- 单击开始按钮, 2.-键入cmd 3.- 出现在搜索结果中时,右键单击“命令提示符”。点击“以管理员身份运行”。
当控制台出现时复制下一个命令:
netstat -ab
【讨论】:
以上是关于mysql启动错误的主要内容,如果未能解决你的问题,请参考以下文章
Ubuntu启动停止重新启动MySQL,查看MySQL错误日志中文编码错误