show global variables like 'port'; 查看端口号
mysql安装(Linux)
rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
yum repolist enabled | grep "mysql.*-community.*"
yum -y install mysql-community-server
systemctl enable mysqld 计入开机启动
systemctl start mysqld 启动进程
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
show global variables like 'wait_timeout'; 关闭一个非交互的连接之前要等待的秒数
set global wait_timeout=60; 设置关闭一个非交互的连接之前要等待的秒数
set global interactive_timeout=60;
show variables like "max_connections"; 查看最大连接数
mysqldump -uroot -p jfx >jfx.sql 导出数据库结构与数据
service mysqld restart 重启mysql服务
service mysqld stop 关闭
service mysqld start 启动
ps -ef |grep tomcat 查看进程
show variables like '%tmp%'; 查看文件临时目录
https://blog.csdn.net/xizaihui/article/details/52962057 mysql安装
https://www.cnblogs.com/kerrycode/p/4364465.html mysql卸载
linux最大连接数设置不生效的方法
Edit file /usr/lib/systemd/system/mysqld.service
Add at end:
LimitNOFILE=65535
LimitNPROC=65535
$ systemctl daemon-reload
$ systemctl restart mysqld.service