phpstudy mysql升级5.7

下载mysql windows  https://dev.mysql.com/downloads/file/?id=467269

复制一份my-default.ini,改名为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.

[mysqld]
skip-grant-tables  #这个是忘记密码加上去的 正是环境把这个注释了
# 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
explicit_defaults_for_timestamp=true
# 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:/web/PHPTutorial/MySQL"
datadir = "D:/web/PHPTutorial/MySQL/data"
port = 3306
# server_id = .....
default-storage-engine=INNODB 
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

# 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,NO_AUTO_CREATE_USER

默认的参数 会遇到一些问题 比如 这里就用其他人的图了 

 sql_model 用上面代码里的那个配置就行 

mysql忘记密码

扫描二维码关注公众号,回复: 5388224 查看本文章

mysql -u root -p 直接进入 

use mysql

mysql> update user set authentication_string = password("111111") where user="ro
ot" ;

 flush privileges;

之后退出mysql 重启就行了

猜你喜欢

转载自blog.csdn.net/ljwy1234/article/details/88075290