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

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

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

  •  阿暄生活 关于无法启动MySQL服务错误1067如何解决?

    关于无法启动MySQL服务错误1067的解决方法如下:方法一:修改配置文件和删除相关文件 修改my.ini文件:打开MySQL的配置文件my.ini。找到default-storage-engine=InnoDB这一行,将其修改为default-storage-engine=MyISAM。删除日志文件和数据文件:删除MySQL安装目录下的Data目录中的ib_logfile0和ib_logfile1文件。

  • 当遇到无法启动MySQL服务且发生错误1067时,可以尝试以下解决办法:修改配置文件:定位my.ini文件:首先,需要进入MySQL的安装文件夹,找到名为my.ini的配置文件。修改存储引擎设置:在my.ini文件中,找到defaultstorageengine=INNODB这一行,并将其修改为defaultstorageengine=MYISAM。重启MySQL服务:在完成上述...

  • 解决“.net start mysql”启动报错,提示系统错误5的办法如下:以管理员权限运行命令提示符:找到C:WindowsSystem32目录下的cmd.exe文件。右键点击cmd.exe,选择“以管理员身份运行”。在打开的管理员命令提示符窗口中,输入net start mysql尝试启动MySQL服务。创建管理员权限的cmd快捷方式:为了避免每次都...

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

mySQL相关话题

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