Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Not a Bug
-
10.1.18
-
CentOS 7
3.10.0-327.28.3.el7.x86_64
MariaDB: 10.1.18-MariaDB MariaDB Server
Description
Hello,
I have just upgraded our MariaDB server 10.1.17 to 10.1.18 and routinely ran the mysql_upgrade script. I am receiving the following:
"
[root@svr-h000239 databases]# mysql_upgrade -u root -p
Enter password:
Phase 1/6: Checking and upgrading mysql database
Processing databases
mysql
mysql.column_stats OK
mysql.columns_priv OK
mysql.db OK
mysql.event OK
mysql.func OK
mysql.gtid_slave_pos OK
mysql.help_category OK
mysql.help_keyword OK
mysql.help_relation OK
mysql.help_topic OK
mysql.host OK
mysql.index_stats OK
mysql.innodb_index_stats OK
mysql.innodb_table_stats OK
mysql.plugin OK
mysql.proc OK
mysql.procs_priv OK
mysql.proxies_priv OK
mysql.roles_mapping OK
mysql.servers OK
mysql.table_stats OK
mysql.tables_priv OK
mysql.time_zone OK
mysql.time_zone_leap_second OK
mysql.time_zone_name OK
mysql.time_zone_transition OK
mysql.time_zone_transition_type OK
mysql.user OK
Phase 2/6: Fixing views
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
[root@svr-h000239 databases]#
"
I have tried:
- Running the mysql_upgrade script from the parent directory of my /mysql/ folder.
- Creating the slow_log.CSV and general_log.CSV files (they didn't exist before) and setting appropriate privileges for mysql user.
- Restarting MariaDB service.
Regardless of these actions, I still get a failed upgrade result.
Can't say I've ever seen this before following previous MariaDB upgrades.
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.