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.1.8 32bit & 64bit)
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.16>

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 MySQL 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.1.8 32bit & 64bit)
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.16>

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 MySQL 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.

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.9 32 bit - Apache 2.4.39 - PHP 7.3.6/7.2.19/7.1.30/7.0.33/5.6.40 - MySQL 5.7.26 - MariaDB 10.3.15
Wampserver 3.1.9 64 bit - Apache 2.4.39 - PHP 7.3.6/7.2.19/7.1.30/7.0.33/5.6.40 - MySQL 5.7.26/8.0.16 - MariaDB 10.3.15
PhPMyadmin 4.9.0.1 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

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

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.9 32 bit - Apache 2.4.39 - PHP 7.3.6/7.2.19/7.1.30/7.0.33/5.6.40 - MySQL 5.7.26 - MariaDB 10.3.15
Wampserver 3.1.9 64 bit - Apache 2.4.39 - PHP 7.3.6/7.2.19/7.1.30/7.0.33/5.6.40 - MySQL 5.7.26/8.0.16 - MariaDB 10.3.15
PhPMyadmin 4.9.0.1 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote


Sorry, only registered users may post in this forum.