修改mysql全局参数
以全局连接数的参数为例
1、 mysql命令行执行
set global max_connections=1000;
2、 mysql配置文件/etc/my.cong中的[mysqld]加入一行
max_connections=1000;
忘记root密码
1、在mysql的配置文件/etc/my.conf中[mysqld]中添加skip-grant-tables
2、service mysqld restart
3、登录mysql客户端,mysql -uroot -p (直接点击回车,密码为空)
4、重新设定root密码
use mysql;
update user set authentication_string=password(‘123456’) where user=‘root’;
5、去除/etc/my.conf中[mysqld]中的skip-grant-tables并重启mysql