0

I have a complete backup of my XAMPP installation. Unfortunately I forgot to export my database to .sql files. But as mentioned i have all .frm, .idb and ibdata1 ib_logfile* and so on.

However if I simply copy the backed up files into the /opt/lampp/var/mysql directory I get the following error:

(Switching back to the original directory created by the XAMPP installation is completely fine, though.)

Connection for controluser as defined in your configuration failed.

and

phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.

For my /opt/lampp/var/mysql folder I did

sudo chown -R mysql mysql
sudo chgrp -R mysql mysql

What am I missing to restore the database from the XAMPP backup?

2 Answers 2

1

I don't know why I didn't try this earlier, but a simple reboot resolved this issue. Note, that the simple restart of xampp and thus of mysql and apache did not work.

0
0

(Not necessarily a total answer, but some clues of how to move forward.)

"Complete backup" -- Do you mean all the files? If you have all the files in the mysql directory tree, then you have everything except for my.cnf, which is located elsewhere (and probably backed up?).

There are no .sql files in a normal installation, so I don't understand that issue.

The 'rejected connection' sounds like the reload mixed up the data files you dumped, some of which contain the user/pwd info with a fresh install of MySQL, which does not have such.

Can you get in with user=root and no password? If so, one approach is to recreate the users and passwords. (But first check that the rest of the data is intact.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.