自己用的一些mysql配置命令

Mysql 给与远程权限:
GRANT ALL PRIVILEGES ON . TO ‘root’@‘192.168.1.100’ IDENTIFIED BY ‘’ WITH GRANT OPTION;
flush privileges

centos防火墙查看以及开启
查看已经开放的端口

firewall-cmd --list-ports
1
开启端口

firewall-cmd --zone=public --add-port=80/tcp --permanent

命令含义:
–zone #作用域
–add-port=80/tcp #添加端口,格式为:端口/通讯协议
–permanent #永久生效,没有此参数重启后失效
开启端口后记得重启

firewall -cmd --reload
1
防火墙其他命令

#停止firewall
systemctl stop firewalld.service
#禁止firewall开机启动
systemctl disable firewalld.service
postman 模拟ajax请求
header 里设置
Content-Type: application/x-www-form-urlencoded
X-Requested-With:XMLHttpRequest

查看当前链接
show status like ‘Threads%’;
查看数据库最大连接
show variables like ‘%max_connections%’;
修改最大链接
set global max_connections=10000;

猜你喜欢

转载自blog.csdn.net/weixin_42094764/article/details/114658528