Comments - mysql_upgrade -p is failed

6 years, 6 months ago kanika satija

When migrating from MySQL to MariaDB, MariaDB has some different definitions for certain privilege tables(proc and event).This means that the structures of some of the MySQL tables are not valid for MariaDB.

Your issue “Phase 4/4: Running 'mysql_fix_privilege_tables' ERROR 1062 (23000) at line 577: Duplicate entry 'tracs_dataf-grmt_updt-PROCEDURE' for key 'PRIMARY' FATAL ERROR: Upgrade failed” is regarding table “mysql.proc”. This table holds stored procedures and stored functions, collectively known as "Stored Routines".

After migration from mysql to mariadb , resolve this issue by following below steps: 1) Take dump of mysql.proctable mysqldump -uroot -p mysql proc > /tmp/mysql-proc.sql

2) Drop proc table

  1. mysql -u root -p mysql MariaDB [mysql]> drop table proc; MariaDB [mysql]>\q 3) Run mysql upgrade mysql_upgrade

4) Restore proc table mysql -uroot -p mysql < /tmp/mysql-proc.sql

 
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.