同一台机器装两个MySQL
发布日期:2021-10-26 12:56:48 浏览次数:1 分类:技术文章

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

hot3.png

第二个MySQL的安装

1.配置my.ini

注意:端口号不能是3306

[client]

port=3307

[mysql]

default-character-set=utf8

[mysqld]

port=3307

basedir=F:\mysql-5.7.18-winx64\

datadir=F:\mysql-5.7.18-winx64\data

character-set-server=utf8

default-storage-engine=INNODB

max_connections=100

query_cache_size=0

tmp_table_size=35M

thread_cache_size=8

key_buffer_size=55M

read_buffer_size=64K

read_rnd_buffer_size=256K

sort_buffer_size=256K

innodb_flush_log_at_trx_commit=2

innodb_log_buffer_size=32M

innodb_buffer_pool_size=4096M

innodb_log_file_size=54M

innodb_thread_concurrency=10

 

 

 

2.服务

注意:服务名与默认MySQL不能一样

创建服务

mysqld install MySQL_new  --defaults-file="E:\*\my.ini"

启动服务

mysqld --defaults-file=F:\*\my.ini MySQL_new 

 

3.

mysql -uroot -P53017 登录

 

update user set host = '%' where user = 'root';

grant all privileges on *.* to  identified by 'uid5a827' with grant option;

flush privileges;

 

 

1.用root 进入mysql后

mysql>set password =password('你的密码');

mysql>flush privileges;

2.使用语句

mysql> all on *.* to 'root'@'localhost' IDENTIFIED '你的密码'with option ;

mysql>flush privileges;

 

3.进入mysql库修改user表

mysql>use mysql;

mysql>update user set password=password('你的密码') where user='root';

mysql>flush privileges;

转载于:https://my.oschina.net/mengzhang6/blog/1816429

转载地址:https://blog.csdn.net/weixin_33782386/article/details/92483699 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:Teamcity集成环境下的Agent编译节点安装说明
下一篇:为应用程序池“#”提供服务的进程意外终止,进程ID是... IIS程序池自动停止

发表评论

最新留言

关注你微信了!
[***.104.42.241]2024年04月24日 14时27分19秒