Thursday, June 17, 2021

mysql_upgrade return error "Can't get stat of './mysql/general_log.CSV"

mysql_upgrade return error

Phase 3/6: Running 'mysql_fix_privilege_tables'
ERROR 13 (HY000) at line 286: Can't get stat of './mysql/general_log.CSV' (Errcode: 2 "No such file or directory")
ERROR 13 (HY000) at line 297: Can't get stat of './mysql/slow_log.CSV' (Errcode: 2 "No such file or directory")
ERROR 13 (HY000) at line 299: Can't get stat of './mysql/slow_log.CSV' (Errcode: 2 "No such file or directory")
ERROR 13 (HY000) at line 301: Can't get stat of './mysql/slow_log.CSV' (Errcode: 2 "No such file or directory")
FATAL ERROR: Upgrade failed

Solution:

elenstElena Stepanova added a comment - 2016-10-11 17:42

This is very strange that general_log.CSV and slow_log.CSV did not exist, do you know how it happened? Did somebody remove them manually?
Did general_log.frm and slow_log.frm files exist?
The most likely reason for the problem is that due to the disappearance of CSV files, the tables were left in an inconsistent state.
You can try to do the following:

# Make sure there are no remains of the table
- rm ./mysql/general_log.* ./mysql/slow_log.*
# connect to the server and run
[MariaDB]> FLUSH TABLES;
# Then re-run 
mysql_upgrade -uroot -p --force 

It should work unless somebody previously tried to convert general_log and slow_log tables into InnoDB, in this case things can be a bit more complicated.


source: https://jira.mariadb.org/browse/MDEV-11032

Centos 7 reset root/ any user lost password / lockout due to cant remember password

1. Need to be in front of the terminal. (Physically if not vm). 2. Reboot the server 3. Press 'e' in the GRUB2 boot screen. 3. bunch...