MySQL_error

error

解决MYSQL的错误:Got a packet bigger than ‘max_allowed_packet’ bytes

数据库客户端和数据库服务器端器均有自己的max_allowed_packet变量,因此,如你打算处理大的信息包,必须增加客户端和服务器上的该变量配置数值。
一般情况下,服务器默认max-allowed-packet为1MB,客户端的max-allowed-packet为16MB。

[root@ocp init.d]# mysql -hlocalhost -pabcd1234 -S /data/mysql/data/mysqld.sock
ERROR 1862 (HY000): Your password has expired. To log in you must change it using a client that supports expired passwords.

很明显报错显示:change it using a client that supports expired passwords

ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement

解决方法:alter user root@‘localhost’ identified by ‘abcd1234’;不是update mysql.user set authentication_string=password(‘abcd1234’) where user=‘root’;

ERROR 1222 (21000): The used SELECT statements have a different number of columns

union/union all 中SELECT 列表中的表达式在数量上必须匹配或是显示使用NULL来补足。