一、不管在mysql中執行什麼語句,都會報如下錯誤:mysql
You must reset your password using ALTER USER statement before executing this statement.sql
在網上找了一下緣由,看到如下信息數據庫
這就是由於數據庫的這個默認的default_password_lifetime參數致使的緩存
在數據庫中執行select version(),顯示個人版本是5.7.25,default_password_lifetime就該是0,查詢以後果真是ide
這個時候,咱們須要更改密碼就行了:ui
mysql>alter user user() identified by "yourpasswd";this
而後再執行你須要的語句就沒有問題了。blog
二、在mysql導入數據時,報錯信息以下:內存
Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage; increase this mysqld variable and try againit
提示很明白了,是要求的緩存比設置的參數多,讓增長max_binlog_cache_size這個參數並重試,那咱們就修改一下參數吧
打開mysql的配置文件/etc/my.cnf ,找到max_binlog_cache_size,將參數設置得大一點(我之前是512M,如今修改爲1024M),保存以後重啓,從新導入數據就不會報錯了。
三、在mysql導入數據時,報錯信息以下:
error 1534 (HY000): writing one row to the row-based binary log failed
這是由於內存不足致使的binlog cache size不夠不能寫入binlog,致使語句沒法執行
在配置文件中調整binlog_cache_size和max_binlog_cache_size參數的值,改大一點
binlog_cache_size = 128Mmax_binlog_cache_size = 512M