mysql Startup 1067 Error and Modified Character Set Restart Invalid Recovery Problem

  • 2021-09-11 21:39:39
  • OfStack

Downloaded the decompressed version of mysql-5. 6.37-winx64. zip of official website, modified the configuration file, installed the service and used it directly;

There is a Chinese garbled code. The solution is as follows:

In the mysql-5. 6.37-winx64 directory, create and configure a new my. ini file (the contents can be found on the Internet, or refer to my-default. ini manual configuration)

Note:

[client] Do not misplace nodes, such as:

Wrong way:


[mysqld]
character-set-server=utf8
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
# innodb_buffer_pool_size = 128M
[client]
default-character-set=utf8
# Remove leading # to turn on a very important data integrity option: logging

ps: The following attributes are under the [mysqld] node, so if the [client] node is placed, it will become the attributes of [client]

Causing a later error: mysql: unknown variable 'basedir=D:\ mysql-5. 6.37-winx64'


 basedir = D:\\mysql-5.6.37-winx64
 datadir = D:\\mysql_data

The correct way should be to put the [client] node in the back or front, not in the [mysqld] node. As for net start mysql starting mysql service, there is a 1067 error. Check the log and find out


MySQL: Table 'mysql.plugin' doesn't exist
2017-10-17 11:40:50 2928 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2017-10-17 11:40:50 2928 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist , 
 Finally, it will datadir = D:\\mysql_data  Replace with  datadir = D:\\mysql-5.6.37-winx64\\data

Service startup is completed (because my. ini was not created before, and 1 directly uses the default configuration, so the data location path does not correspond, so just change it)

Summarize


Related articles: