MySQL排错记录

6 篇文章 0 订阅
vim /etc/default/grub   possible_cpus=8   grub2-mkconfig -o /boot/grub2/grub.cfg;

# 每条MySQL语句都会记录
set global general_log='ON';
tail -f /var/lib/mysql/localhost.log

Stop mysql may hung up for the first time, just kill it instead

/var/log/mysqld.log 

# 设置远程访问
grant all on *.* to 'vmi'@'%';
GRANT ALL PRIVILEGES ON *.* TO 'vmi'@'%' WITH GRANT OPTION;
# 打开端口
firewall-cmd --zone=public --add-port=3306/tcp --permanent

# 查看进程
show processlist
select * from information_schema.processlist where Command != 'Sleep' order by Time desc;

insert vmi.servers_site (name) values ('uuu');

# 查看是否有死锁
SHOW ENGINE INNODB STATUS\G

# 查询全局等待事务锁超时时间
SHOW GLOBAL VARIABLES LIKE 'innodb_lock_wait_timeout';

# 设置全局等待事务锁超时时间
SET  GLOBAL innodb_lock_wait_timeout=100;


# 查询当前会话等待事务锁超时时间
SHOW VARIABLES LIKE 'innodb_lock_wait_timeout';


innodb_lock_wait_timeout=100
set innodb_lock_wait_timeout=100;   ---------session
set global innodb_lock_wait_timeout=100;   ---------global
# 注意global的修改对当前线程是不生效的,只有建立新的连接才生效

virsh  start  test01
#也可以开启后进入系统,使用ctrl+]可以回到宿主机
virsh  start  test01  --console

# 查看cpu配额配置 virsh schedinfo 3232299012

echo -e "io.dcloud.SuccezBI\n" > /vmi/unia/gm/system/etc/BaiduMaps_Android_10-20-2_1009176a.apk
echo -e "io.dcloud.SuccezBI\n" > /var/unia/gm/system/etc/BaiduMaps_Android_10-20-2_1009176a.apk

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值