Migrate database

Asked

Viewed 217 times

0

Colleagues.

We had a problem in a computer from which we had to format it, but we kept the files and had to reinstall the programs, among them Xampp. The folder that was left was c:/xampp, so we renamed it to c:/xampp_old and reinstalled it.

The problem lies in the migration of the database. We open the folder c:/xampp_old/mysql/data/ and copy the folders of the databases that were created before formatting and play to the folder that Xampp created c:/xampp/mysql/data/ but when we did, mysql gives error, does not start.

How do we migrate the old xampp database to the new?

1 answer

2

Hello, I needed to perform a similar procedure and follows the solution I applied:

1 - I opened the Control Panel of my c:/xampp_old and started only the mysql service;

2 - Then I opened the Control Panel of Meu c:/xampp and started Apache;

3 - I accessed the Phpmyadmin of c:/xampp and connected in the Mysql Base startada in c:/xampp_old and realized the complete Export of Databases to file. sql;

4 - I performed the export of the Users accounts along with the access permissions to these banks and saved also in file . sql;

5 - I terminated the Phpmyadmin connection and stopped Mysql from the c:/xampp_old control panel;

6 - Startei Mysql from c:/xampp Control Panel;

7 - I accessed Phpmyadmin and connected, this time will be connecting in the new Mysql;

8 - I executed the SQL import first by importing the Database and then importing the Permissions;

9 - How I exported the Root User in my case my Phpmyadmin lost the connection after running, being necessary to log in again, but already with the User and Password that had configured in previous Mysql.

OBS: I know the question was done in time, but I hope it is useful for those who need to perform this procedure. In My Case I did the same to upgrade my entire Xampp structure to a newer version.

If someone has difficulty executing these processes in detail, they can return with questioning.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.