博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
升级phpstudy2018默认mysql版本到5.7
阅读量:7084 次
发布时间:2019-06-28

本文共 1692 字,大约阅读时间需要 5 分钟。

升级phpstudy2018默认mysql版本到5.7

phpstudy2018默认自带MySQL版本是5.5,现将其升级到5.7

1.备份原来的MySQL文件夹phpstudy\PHPTutorial\MySQL重命名为MySQL5.5

2.将下载的mysql5.7压缩文件解压缩,并放在phpstudy\PHPTutorial\文件夹下,命名为MySQL;

3.将备份的MySQL5.5中的my.ini文件拷贝到phpstudy\PHPTutorial\MySQL\bin目录下

my.ini的参考内容:

 
[client]
port=3306
[mysql]
default-character-set=utf8
[mysqld]
port=3306
basedir="D:/phpstudy/PHPTutorial/MySQL/"
datadir="D:/phpstudy/PHPTutorial/MySQL/data/"
character-set-server=utf8
default-storage-engine=INNODB
#支持 INNODB 引擎模式。修改为 default-storage-engine=INNODB 即可。
#如果 INNODB 模式如果不能启动,删除data目录下ib开头的日志文件重新启动。
max_connections=512
query_cache_size=0
tmp_table_size=32M
thread_cache_size=8
myisam_max_sort_file_size=64G
myisam_sort_buffer_size=35M
key_buffer_size=25M
read_buffer_size=64K
read_rnd_buffer_size=256K
sort_buffer_size=256K
innodb_additional_mem_pool_size=2M
innodb_flush_log_at_trx_commit=1
innodb_log_buffer_size=1M
innodb_buffer_pool_size=47M
innodb_log_file_size=24M
innodb_thread_concurrency=8
innodb_thread_concurrency=8
innodb_thread_concurrency=8
innodb_thread_concurrency=8
innodb_thread_concurrency=8
innodb_thread_concurrency=8
innodb_thread_concurrency=8
innodb_thread_concurrency=8
innodb_thread_concurrency=8
#新加
innodb_file_per_table = 1
skip-grant-tables = 1 #跳过权限验证
log-error = D:/phpstudy/PHPTutorial/MySQL/data/error.log

4.以管理员身份运行cmd

进入phpstudy\PHPTutorial\MySQL\bin目录;

运行mysqld --initialize初始化MySQL;

运行mysqld –install安装MySQL;

5.修改密码:

登入mysql:mysql -u root -p

(因为配置文件里配置了不进行登录验证)
进入mysql后执行:ALTER USER USER('你的密码') IDENTIFIED BY 'root';

进行root密码修改,修改完成设置配置文件里的skip-grant-tables = 1,再重启mysql

6.apache或nignx能启动mysql启动不了

之前已经装过Mysql,要把系统服务里面的MySQL删除,留下MySQLa服务。 
在cmd命令行下输入:sc delete mysql 即可删除。

 

参考美文:

原文地址

转载地址:http://spmml.baihongyu.com/

你可能感兴趣的文章
JS(JavaScript)的初了解5(更新中···)
查看>>
Hadoop Yarn源码 - day1
查看>>
导出csv用excel打开后数字不用科学计数法显示(0123456显示123456)
查看>>
ssm框架,出现xxx不能加载,或者bean不能加载时的解决方案之一
查看>>
springmvc+mybatis多数据源配置,AOP注解动态切换数据源
查看>>
Centos 6.8 系统下安装RabbitMQ方法
查看>>
SQL Server不能启动
查看>>
Educational Codeforces Round 65 (Rated for Div. 2) C. News Distribution
查看>>
[转] 如何写好.babelrc?Babel的presets和plugins配置解析
查看>>
The JVM Architecture Explained
查看>>
输入框禁止表情
查看>>
最大乘积(大佬的代码)
查看>>
dagger android 学习(四):基于dagger2的mvp架构
查看>>
CentOs7 使用iptables防火墙开启关闭端口
查看>>
12.29.作业
查看>>
项目管理初探
查看>>
keras入门--Mnist手写体识别
查看>>
animation渐进实现点点点等待效果实例页面
查看>>
配置 ssh无密码登陆
查看>>
java读取和写入浏览器Cookies
查看>>