时间:2021-07-01 10:21:17 帮助过:3人阅读
delete from mysql.user where user=
‘‘
;
update mysql.user
set
password=password(
‘123‘
) where user=
‘root‘
;
delete from mysql.db where user=
‘‘
;
flush privileges;
2、创建数据库并授权给用户
create database mysqldb default charset utf8;
grant all on mysqldb.* to username@localhost identified by
‘123‘
;
3、对于并发数高时需要修改mysql的最大连接数,否则会报错,
最大值16384
查看最大连接数
show variables like ‘%max_connections%‘;
修改最大连接数
set GLOBAL max_connections = 1000;
本文出自 “运维笔记” 博客,请务必保留此出处http://quliren.blog.51cto.com/9849266/1969055
mysql初始化
标签:mysql