问题汇总

MySQL错误信息总结

Linux · 9月3日 · 2019年

一、内存溢出报错

2019-09-03T10:42:54.512893+08:00 0 [ERROR] InnoDB: Cannot allocate 1073742360 bytes of memory after 60 retries over 60 seconds. OS error: Cannot allocate memory (12). Check if you should increase the swap file or ulimits of your operating system. Note that on most 32-bit computers the process memory space is limited to 2 GB or 4 GB.
2019-09-03 10:42:54 0x7fbb69544780  InnoDB: Assertion failure in thread 140442902742912 in file ut0ut.cc line 957

 

1、解决办法:

修改配置my.conf文件内存大小,根据实际场景慢慢调优

 

innodb_buffer_pool_size                         =2048M                  

 

二、 linux上是区分表名大小写的,但是可以通过 my.cnf文件中设置不区分!

MySQL8.0

2018-04-30T22:39:59.709423Z 1 [ERROR] [MY-011087] [Server] Different lower_case_table_names settings for server ('1') and data dictionary ('0').

 

解决修改配置文件

参数的含义及解决办法,vim /etc/my.cnf

lower_case_table_names: 此参数不可以动态修改,必须重启数据库
lower_case_table_names = 1  表名存储在磁盘是小写的,但是比较的时候是不区分大小写
lower_case_table_names=0  表名存储为给定的大小和比较是区分大小写的 
lower_case_table_names=2, 表名存储为给定的大小写但是比较的时候是小写的

 

三、Linux安装MySQL5.7.29为摸个库授权

create user 用户名称@'%' identified by '密码';
GRANT ALL PRIVILEGES ON 库.* TO '用户'@'地址' IDENTIFIED BY 'dev' WITH GRANT OPTION;
grant all privileges on 库.* TO '用户'@'地址' identified by '密码';

 

0 条回应