Today mysql5.5 configuration phpstudy will upgrade some of the issues found in version mysql5.7

mysql version 5.7.22 to version 5.5 is, my.ini vary widely, attach my own simple version 5.7.22 my.ini

# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/5.7/en/server-configuration-defaults.html
# *** DO NOT EDIT THIS FILE. It's a template which will be copied to the
# *** default location during install, and will be replaced if you
# *** upgrade to a newer version of MySQL.
[client]
port=3306
[mysql]
default-character-set=utf8
[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.
port=3306
basedir = "D:/phpStudy/PHPTutorial/MySQL"
datadir = "D:/phpStudy/PHPTutorial/MySQL/data"
# port = .....
# server_id = .....


# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
# join_buffer_size = 128M
# sort_buffer_size = 2M
# read_rnd_buffer_size = 2M 

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 

Copy and paste it, make sure my.ini 5.7 is able to identify, and then initialize the database

mysqld --initialize

Otherwise it will report a bunch of errors when I upgraded with the my.ini 5.5, and then eat a lot of bitterness, next time I will directly copy the installation .

When given: When The innodb_system data file 'ibdata1' must be writable: [ERROR] InnoDB

Solution: Turn off mysql, after deleting ib_logfile0, ib_logfile1 data file folder, and then restart mysql

Published 20 original articles · won praise 8 · views 50000 +

Guess you like

Origin blog.csdn.net/a26637896/article/details/84554593