MySQL报错集合

**

一、MySQL主主坑

**
【报错】
ERROR 1396 (HY000): Operation CREATE USER failed for ‘root’@‘192.168.4.%’

mysql> CREATE USER 'root'@'192.168.4.%' identified by 'maba521@chaoA';
ERROR 1396 (HY000): Operation CREATE USER failed for 'root'@'192.168.4.%'
#删除之前授权
mysql>  drop user root@'192.168.4.%';
Query OK, 0 rows affected (0.00 sec)
#重新授权
mysql> CREATE USER 'root'@'192.168.4.%' identified by 'maba521@chaoA';
Query OK, 0 rows affected (0.00 sec)

【报错】
mysqldump: Got error: 1045: Access denied for user ‘root’@‘192.168.4.114’ (using password: YES) when trying to connect

#给192.168.4.114权限
GRANT ALL ON *.* TO 'root'@'192.168.4.%';
flush privileges;

【报错】
mysqldump: [Warning] Using a password on the command line interface can be insecure.
mysqldump: Got error: 1045: Access denied for user ‘root’@‘192.168.4.114’ (using password: YES) when trying to connect

#解决
#给主机192.168.4.%权限
CREATE USER 'root'@'192.168.4.%' identified by 'maba521@chaoA';   #此处密码和root登录密码一致

【报错】
Cannot allocate memory for the buffer pool
【解决】
MySQL8需要最低4G内存,2G内存扩至4G,解决问题。

【报错】
ERROR 4031 (HY000): The client was disconnected by the server because of inactivity. See wait_timeout and interactive_timeout for configuring this behavior.
No connection. Trying to reconnect…
【解决】

#在 /etc/my.cnf中加入
[mysqldump]
quick
max_allowed_packet = 10M
#重启
service mysqld restart

你可能感兴趣的:(学习报错,运维,linux,mysql)