Search code examples
phpwindowsxampp

Update XAMPP to PHP 8.1, Keep MySQL Databases


I have XAMPP with PHP 7.x on Windows 10.

When I install new XAMPP that supports PHP 8.1, there is no option to upgrade the older. And setup don't accept current XAMPP folder. I can backup htdocs folder and uninstall my older XAMPP.

How I a keep my MySQL databases? (or backup, if there id no way to keep them)


Solution

  • I found mysqldump in c:\xampp\mysql\bin folder.

    I used --all-databases parameter to dump all my dbs:

    mysqldump -u USER_NAME -p PASSWORD --all-databases > BACKUP_PATH.sql
    

    Tanks All.