Mysql startup reported 1067 error

Today, a project needs to use mysql, because the new computer used by the company has not been installed, so I downloaded a decompressed version of version 5.6.29.

 

The installation and configuration of mysql itself is very simple.

Unzip it locally (I unzip it in d:\tools), copy the my-default.ini file as my.ini, and modify the configuration inside as follows:

 

[mysqld]

# 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

# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin

# These are commonly set, remove the # and set as required.
basedir=D:\tools\mysql
datadir=D:\tools\mysql\data
# port=3306
# server_id = mysql

 

 

Then execute the service installation command in the bin directory as an administrator:

 

mysqld -install

 The system prompts that the service installation was successful.

 

 

D:\tools\mysql\bin>mysqld -install
Service successfully installed.

 

 

Next, start the service, but the system prompts that the startup failed, 1067 error

 

D:\tools\mysql\bin>net start mysql
MySQL service is starting...
The MySQL service failed to start.

system error.

System error 1067 has occurred.

The process terminated unexpectedly.

 

 

I searched online and found that the 1067 error refers to a configuration file error. There are also some solutions listed online:

1. Determine the location of the my.ini file, including the window directory, the installation directory, etc.; -- not tried

2. Increase the configuration -- not tried, my mysql does not have this file

[WinMySQLadmin]

Server=C:/Program Files/mysql/bin/mysqld-nt.exe

3. Modify the configuration to "default-storage-engine=MyISAM" -- not tried

4. Reinstall mysql -- not tried

5. Reinstall the system -- not tried

6. Modify the my.ini file to ANSI (say this file cannot be UTF-8) -- try, it doesn't work

 

Finally, a netizen's post seems to see a solution, that is, go to the system log to view the startup error log.

wrote
Can't find messagefile 'D:\ ools\mysql\share\errmsg.sys'

For more information, see Help and Support Center at http://www.mysql.com.

 It was found that there was an error in the path in the log, and the problem was found. It should be that the code that reads the configuration file escapes the backslashes in the path, so the path reading fails.

Solution: Modify the path configuration in the my.ini file, change the backslashes to forward slashes, start mysql, and succeed.

 

Configuration file:

shell writes
[mysqld]

# 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

# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
# log_bin

# These are commonly set, remove the # and set as required.
basedir=D:/tools/mysql
datadir=D:/tools/mysql/data
# port=3306
# server_id = mysql

 

Start mysql:

shell writes
D:\tools\mysql\bin>net start mysql
MySQL service is starting.
MySQL service has been started successfully.

 

analyze:

    The decompressed version provided by the official, unless otherwise specified, should be unlikely to depend on certain configurations or requirements in the system, such as adding configuration items, etc. Therefore, operations such as reinstalling mysql or reinstalling the system should be tried as little as possible. Documenting it here in case you run into the same problem later.

Note: This analysis is only for the decompressed version, and the installed version may write different content according to different systems, which is not included in this discussion.

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326959010&siteId=291194637