mysql启动错误

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 ...
mysql启动错误
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')
->2017-12-26
mengvlog 阅读 108 次 更新于 2025-09-10 04:44:56 我来答关注问题0
  • MySQL启动1053错误的解决方法主要有两种:方法一:1. 卸载并重新安装MySQL服务: 在DOS命令行中,使用mysqldnt remove mysqlservice命令来卸载MySQL服务。如果命令执行成功,会有英文提示显示卸载成功。 接着,使用mysqldnt install mysqlservice命令重新注册MySQL服务。同样,如果命令执行成功,会有英文提...

  •  翡希信息咨询 不是吧不是吧,MySQL服务无法启动?看这里的万能解决法!

    输入mysqld --console命令,尝试启动MySQL。在控制台输出中,可能会看到MySQL启动失败的详细错误信息,这些信息对于定位问题非常有帮助。检查并修复配置文件 如果mysqld --console命令输出了配置文件相关的错误信息,如my.ini文件配置错误,那么需要仔细检查并修复这些配置。打开MySQL安装目录下的my.ini文件。检...

  •  翡希信息咨询 win11安装配置MySQL超详细教程(保姆级),MySQL安装不显示开发者选项及启动错误解决办法

    点击“Execute”,等待安装程序执行完成,然后点击“Next”。配置MySQL 依次点击“Next”,在配置类型界面选择“Use Legacy Authentication Method”(传统密码方式,根据个人习惯选择)。设置MySQL密码,确认后点击“Next”。应用配置 点击“Execute”,等待配置执行。如果遇到“Starting the server”错误,按以下...

  •  翡希信息咨询 mysql启动失败 错误1053

    第一步:使用mysqldnt remove mysqlservice命令卸载MySQL服务。第二步:使用mysqldnt install mysqlservice命令重新安装MySQL服务。注意:这里的mysqldnt可能因MySQL版本或安装方式的不同而有所变化,例如在某些版本中可能需要使用mysqld或mysqld.exe。通过服务管理器操作MySQL服务:打开“服务”管理器。找到MySQ...

  •  翡希信息咨询 启动mysql 出现错误 2003 原话是:ERROR 2003 (HY000): Can't connect to MySQL server on 'localhos

    可以通过服务管理器或命令行工具来重启服务。验证连接:重启 MySQL 服务后,尝试重新连接到数据库,验证问题是否已解决。注意:在处理端口冲突和重启服务时,请确保了解这些操作对系统和其他服务的影响,以避免不必要的麻烦。如果问题依然存在,可能需要进一步检查 MySQL 的配置文件或其他系统设置。

檬味博客在线解答立即免费咨询

mySQL相关话题

Copyright © 2023 WWW.MENGVLOG.COM - 檬味博客
返回顶部