Migrating mySql databases from 2.2. to 3.1.7
Posted by: dejudicibus (---.cust.vodafonedsl.it)
Date: April 03, 2019 11:13AM

I just migrated from WampServer 2.2 to 3.1.7.

1. I uninstalled WampServer 2.2: everything was removed but content of www and data in mysql folder
2. I installed WampServer 3.1.7
3. I moved the content of data to mysql5.7.24
4. I made some change in old aliases and confs to match new Apache requirements
5. I started WampServer

Wamp is orange now, 2 services started out of 3. It looks like MySql has problems to start:

wampmysqld64: Table 'mysql.plugin' doesn't exist
2019-04-03T09:13:56.677886Z 0 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
2019-04-03T09:13:56.681875Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2019-04-03T09:13:56.688024Z 0 [Warning] Failed to open optimizer cost constant tables

2019-04-03T09:13:56.690381Z 0 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'mysql.user' doesn't exist
2019-04-03T09:13:56.691409Z 0 [ERROR] Fatal error: Failed to initialize ACL/grant/time zones structures or failed to remove temporary table files.
2019-04-03T09:13:56.692678Z 0 [ERROR] Aborting

So it looks like I have to initialize something but I do not know how. I tried mysqld but it does noy work:

D:\Server\wamp\bin\mysql\mysql5.7.24>bin\mysqld --initialize
2019-04-03T09:15:58.560464Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defau
lts_for_timestamp server option (see documentation for more details).
2019-04-03T09:15:58.565058Z 0 [ERROR] --initialize specified but the data directory has files in it. Aborting.
2019-04-03T09:15:58.565472Z 0 [ERROR] Aborting

Any idea what I have to do to migrate all old databases?

Options: ReplyQuote
Re: Migrating mySql databases from 2.2. to 3.1.7
Posted by: dejudicibus (---.cust.vodafonedsl.it)
Date: April 03, 2019 11:32AM

Please, note that if I call phpmyadmin I get the login page, but if I try to login, I get

mysqli_real_connect(): (HY000/2002): No connection could be made because the target machine actively refused it.

Options: ReplyQuote
Re: Migrating mySql databases from 2.2. to 3.1.7
Posted by: RiggsFolly (Moderator)
Date: April 03, 2019 11:41AM

Hi

Did you take backups of your databases BEFORE uninstalling the old WAMPServer?

Problem appears to be that the old databases are still in the mysql/data folders. These databases of course will not be compatible with the new Mysql server in the new WAMPServer

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: Migrating mySql databases from 2.2. to 3.1.7
Posted by: dejudicibus (---.cust.vodafonedsl.it)
Date: April 03, 2019 11:50AM

No, I did not... sad smiley

Options: ReplyQuote
Re: Migrating mySql databases from 2.2. to 3.1.7
Posted by: dejudicibus (---.cust.vodafonedsl.it)
Date: April 03, 2019 11:50AM

Is there a way to migrate those databases? Maybe by CLI?

Options: ReplyQuote
Re: Migrating mySql databases from 2.2. to 3.1.7
Posted by: RiggsFolly (Moderator)
Date: April 03, 2019 11:54AM

You could have a look at `mysql_upgrade.exe` but you may need to jump through quite a few hoops like installing versions of mysql between old version and new version to get it from where it is to where you want it to be.

See my signature, the bit in red.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote
Re: Migrating mySql databases from 2.2. to 3.1.7
Posted by: dejudicibus (---.cust.vodafonedsl.it)
Date: April 03, 2019 11:58AM

mysql_upgrade.exe: is there a tutorial for that?

Options: ReplyQuote
Re: Migrating mySql databases from 2.2. to 3.1.7
Posted by: Otomatic (Moderator)
Date: April 03, 2019 01:28PM

Hi,

> mysql_upgrade.exe: is there a tutorial for that?
Yes, into mysql documentation.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote
Re: Migrating mySql databases from 2.2. to 3.1.7
Posted by: Otomatic (Moderator)
Date: April 04, 2019 05:19PM

mysql_upgrade.exe

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote


Sorry, only registered users may post in this forum.