原文:升级phpstudy2018默认mysql版本到5.7

版权声明:在那最初的相遇中,我们都曾经为彼此心动过... https://blog.csdn.net/weixin_36185028/article/details/81632602

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 即可删除。

 

参考美文:

https://blog.csdn.net/u010300913/article/details/79193328

https://blog.csdn.net/laiyijian/article/details/80678225

https://blog.csdn.net/laiyijian/article/details/80678225

最新文章

  1. error C2061: syntax error : identifier '__RPC__out_xcount_part'
  2. mysql关键字讲解(join 、order by、group by、having、distinct)
  3. BestCoder 1st Anniversary
  4. Dom对象和jQuery包装集
  5. MSSQL WITH (NOLOCK) 脏读
  6. WPF中自定义绘制内容
  7. VB VBA VBS有什么区别?
  8. Spring Boot + Freemarker多语言国际化的实现
  9. 基于SSM框架实现简单的登录注册
  10. Linux Debugging(三): C++函数调用的参数传递方法总结(通过gdb+反汇编)
  11. 简单读!tomcat源码(一)启动与监听
  12. day25 Python四个可以实现自省的函数,反射
  13. F#周报2019年第6期
  14. wamp phpcms部署网站问题
  15. 大数据新手之路四:联合使用Flume和Kafka
  16. 修改postfix smtp端口,防止公网扫描浪费你的服务器流量
  17. first H5
  18. dll is in timestamps but is not known in guidmapper… 错误
  19. Install-DedupCore.component 的内容
  20. curl查询公网出口IP

热门文章

  1. HDU 1010 Tempter of the Bone (ZOJ 2110) DFS+剪枝
  2. 使用ToolRunner运行Hadoop程序基本原理分析 分类: A1_HADOOP 2014-08-22 11:03 3462人阅读 评论(1) 收藏
  3. Selector API用法
  4. [CSS] Re-order the appearance of grid items using the order property
  5. 【codeforces 750E】New Year and Old Subsequence
  6. WIN32汇编语言中位图的使用
  7. 毕设二:python 爬取京东的商品评论
  8. ElasticSearch:分析器
  9. spark action之saveastextfile
  10. freemarker中间split字符串切割