Hi Community,
I am using Migration plugin to transfer all the tracking data from wordpress plugin instance to Matomo on-primes.
When I run the following command I get “Fehler beim Aufbau einer Datenbankverbindung” which probably mean "Error establishing the database connection."
I am pretty sure that all the parameters which I supplied in the following command were correct, because I copied them from Matomo/config/config.ini.php so they can not be wrong.
are you sure the MySQL server is available from the Matomo server?
Try to connect the MySQL server from the Matomo server with the mysql command line client… https://dev.mysql.com/doc/refman/8.0/en/mysql.html
Hi @heurteph-ei ,
I tried mysql --user=<target-db-user> --password <target-db-name>
The connection made successfully.
But when I try to run following command, it says database connection error. php wp-content/plugins/matomo/app/console migration:measurable --source-idsite=1 --target-db-host=127.0.0.1 --target-db-username=<targetdb-user> --target-db-password=<target-db-pass> --target-db-name=<target-db-name> --target-db-prefix=matomo_
Hi @heurteph-ei ,
I have checked the source database, It is web28_db1 where is target db is web28_db7 So both are different.
Secondly, I have noticed that the password of source db contains special characters so we have to use in single or double quotes while using following command. mysql --user=web28_1 --password='sdniof)(/wen2389sdfk$sdvkl' web28_db1
Hi @heurteph-ei ,
I created a testing environment on aws EC2 instance.
I created wordpress website, installed Matomo wordpress plugin, installed Migration plugin to Matomo instance and then used the above mentioned command to migrate data from Matomo wordpress plugin to Matomo on-primes, everything worked exactly fine and data also been migrated.
So can you predict/guess what can be the reason due to which the actual data not migrating?
Does shared hosting blocking to migrate data ?
Secondly what can be the best solution? I am planning to clone the complete wordpress website from shared hosting to aws EC2 or local system, then I will migrate data to some Matomo on-primes instance, then I will clone this Matomo instance to shared hosting. Do you want to suggest or add something?
This issue has been resolved, there was an issue with the hosting. So, I cloned the completed website from that hosting to another hosting and migration plugin worked fine there. I migrated all the data to Matomo on-primes instance and delete the clone
Thanks @heurteph-ei for your kind cooperation!