Windows解压的Mysql,编辑my.ini后无法启动。
[mysqld]
innodb_buffer_pool_size = 128M
basedir = D:/mysql-5.6.34-winx64
datadir = D:/mysql-data
port = 3306
server_id = mysql
join_buffer_size = 128M
sort_buffer_size = 2M
read_rnd_buffer_size = 2M
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
D:\mysql-5.6.34-winx64\bin>net start mysql
MySQL 服务正在启动 .
MySQL 服务无法启动。
系统出错。
发生系统错误 1067。
进程意外终止。
日志如下:
2016-10-25 14:27:40 3972 [Note] Plugin 'FEDERATED' is disabled.
MySQL: Table 'mysql.plugin' doesn't exist
2016-10-25 14:27:40 3972 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2016-10-25 14:27:40 3972 [Note] InnoDB: Using atomics to ref count buffer pool pages
2016-10-25 14:27:40 3972 [Note] InnoDB: The InnoDB memory heap is disabled
2016-10-25 14:27:40 3972 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2016-10-25 14:27:40 3972 [Note] InnoDB: Memory barrier is not used
2016-10-25 14:27:40 3972 [Note] InnoDB: Compressed tables use zlib 1.2.3
2016-10-25 14:27:40 3972 [Note] InnoDB: Not using CPU crc32 instructions
2016-10-25 14:27:40 3972 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2016-10-25 14:27:40 3972 [Note] InnoDB: Completed initialization of buffer pool
2016-10-25 14:27:40 3972 [Note] InnoDB: Highest supported file format is Barracuda.
2016-10-25 14:27:40 3972 [Note] InnoDB: Log scan progressed past the checkpoint lsn 49463
2016-10-25 14:27:40 3972 [Note] InnoDB: Database was not shutdown normally!
2016-10-25 14:27:40 3972 [Note] InnoDB: Starting crash recovery.
2016-10-25 14:27:40 3972 [Note] InnoDB: Reading tablespace information from the .ibd files...
2016-10-25 14:27:40 3972 [Note] InnoDB: Restoring possible half-written data pages
2016-10-25 14:27:40 3972 [Note] InnoDB: from the doublewrite buffer...
InnoDB: Doing recovery: scanned up to log sequence number 1600607
2016-10-25 14:27:41 3972 [Note] InnoDB: Starting an apply batch of log records to the database...
InnoDB: Progress in percent: 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99
InnoDB: Apply batch completed
2016-10-25 14:27:41 3972 [Note] InnoDB: 128 rollback segment(s) are active.
2016-10-25 14:27:41 3972 [Note] InnoDB: Waiting for purge to start
2016-10-25 14:27:41 3972 [Note] InnoDB: 5.6.34 started; log sequence number 1600607
2016-10-25 14:27:41 3972 [Note] Server hostname (bind-address): '*'; port: 3306
2016-10-25 14:27:41 3972 [Note] IPv6 is available.
2016-10-25 14:27:41 3972 [Note] - '::' resolves to '::';
2016-10-25 14:27:41 3972 [Note] Server socket created on IP: '::'.
2016-10-25 14:27:41 3972 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
网上方法失败:
D:\mysql-5.6.34-winx64\bin>mysql_upgrade -u root -p
Enter password:
Looking for 'mysql.exe' as: D:\mysql-5.6.34-winx64\bin\mysql.exe
Looking for 'mysqlcheck.exe' as: D:\mysql-5.6.34-winx64\bin\mysqlcheck.exe
Error: Failed while fetching Server version! Could be due to unauthorized access.
FATAL ERROR: Upgrade failed
阿神2017-04-17 15:50:10
你从别处拿来的 mysql 压缩包释放的路径跟原来的路径一致吗?如果不一致,你需要配置 my.cnf/my.ini 重新设置下 datadir 为你目前的 data 目录位置再尝试启动,留意下配置里是不是还有其他路径类的配置。
补充,给你搜了篇 http://zhidao.baidu.com/quest... 看能帮上你不?