第二个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;