Today when you back up a file in source mysqldump, you find that the import process reported the following error:
ERROR 1231 (42000): Variable ' time_zone ' can ' t is set to the value of ' NULL '
ERROR 1231 (42000): Variable ' sql_mode ' can ' t is set to the value of ' NULL '
ERROR 1231 (42000): Variable ' foreign_key_checks ' can ' t is set to the value of ' NULL '
ERROR 1231 (42000): Variable ' unique_checks ' can ' t is set to the value of ' NULL '
ERROR 1231 (42000): Variable ' character_set_client ' can ' t is set to the value of ' NULL '
ERROR 1231 (42000): Variable ' collation_connection ' can ' t is set to the value of ' NULL '
ERROR 1231 (42000): Variable ' sql_notes ' can ' t is set to the value of ' NULL '
Workaround:
Mysql> set max_allowed_packet=1024m; --only valid for current session
Mysql> source./xxxx.sql;
This article is from the "Small Fish Blog" blog, please be sure to keep this source http://395469372.blog.51cto.com/1150982/1729451
MySQL Execute SQL PIN this report error 1231 (42000) The Liberating method