部分转载 :https://blog.csdn.net/github_36326955/article/details/54970808
Linux :
ps -ef |grep mysql
mysql -h主机地址 -u用户名-p用户密码
mysql -h localhost -uxxxxxxx -pxxxxxxx
show variables like "%_buffer%";
根据服务器内存大小来定 最好不要超过60%; 网上说80%感觉有点夸张
SET GLOBAL innodb_buffer_pool_size=67108864;(3*1024*1024*1024,不要忘记;号)
Windows: 貌似Windows 现改现用,重启失效; linux需注意
Error:
The total number of locks exceeds the lock table size
未设置环境变量需要进入mysqlserver Bin下
windows cmd:
mysql -u root -p
密码:root
进入mysql命令
show variables like "%_buffer%";(不要忘记带;号,没有;号表示一条语句没有结束)
默认的innodb_buffer_pool_size=8M
显示的格式是 1M*1024*1024,设置的时候也要这样设置,例如
修改 innodb_buffer_pool_size的值为3G:
SET GLOBAL innodb_buffer_pool_size=67108864;(3*1024*1024*1024,不要忘记;号)