user3537443
user3537443

Reputation: 11

How do I run mysql_upgrade for wamp server or to get Mysql run

Today I installed a new version of wamp server on my computer (over the old one). The icon on the bottom right stays orange after starting wampserver. I found out that Mysql is not starting op. The Mysql log file shows errors like these:

[ERROR] Native table 'performance_schema'.'setup_instruments' has the wrong structure
[ERROR] Native table 'performance_schema'.'setup_timers' has the wrong structure
[ERROR] Native table 'performance_schema'.'performance_timers' has the wrong structure

After searching on the internet I found out that I probably have to run mysql_upgrade

I open the mysql.exe file (with administrator) in this folder C:\wamp\bin\mysql\mysql5.5.8\bin but when I run the upgrade using this syntax: shell> mysql_upgrade; it returns a message that I have an error in my sql-syntax. (I tried it with all services on and with all services off) Does anyone have an idea how I can solve this? Or maybe there are other ways to get Mysql run.

Thanks in advance.

Kind regards, Liesbeth

Upvotes: 1

Views: 7011

Answers (1)

RiggsFolly
RiggsFolly

Reputation: 94662

The mysql_upgrade is a stand alone executable, not a DML or DDL command so it cannot be issued via mysql.exe program.

So first MAKE A BACKUP OF ALL YOUR NEW DATABASE FOLDER as this process can get destructive if things go wrong.

So backup \wamp\bin\mysql\mysql5.5.8\data and all its subfolders, put this somewhere safe!

The copy your old databases to your new version folder.

copy \wamp\bin\mysql\mysql{old version}\data to \wamp\bin\mysql\mysql5.5.8\data

Then you have to run mysql_upgrade.exe as an administrator so start a command window by right clicking the command window icon and selecting Run as Administrator

Then

cd into \wamp\bin\mysql\mysql5.5.8\bin

Now you can issue the upgrade command like this:

mysql_upgrade.exe

Depending on how many databases you have it may take a little time, so dont panic, you have a backup anyway.

Upvotes: 1

Related Questions