Index: sql/sql_acl.cc =================================================================== --- sql/sql_acl.cc (revision 1) +++ sql/sql_acl.cc (working copy) @@ -7810,6 +7810,13 @@ bool save_binlog_row_based; DBUG_ENTER("mysql_user_password_expire"); + /* without check, the next operations will cause crash */ + if (!initialized) + { + my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--skip-grant-tables"); + DBUG_RETURN(-1); + } + tables.init_one_table("mysql", 5, "user", 4, "user", TL_WRITE); #ifdef HAVE_REPLICATION