I want to migrate wordpress database to MYSQL database

Posted July 14, 2021 163 views

Hi everyone,

I installed wordpress on my UBUNTU droplet and my live website is running from there with the standard wp-config define( ‘DB_HOST’, ‘localhost’ );
If I change these settings to my DO Database connection it takes me to the WP installation page. So, wondering do I import my wordpress.sql(I got from pypmyadmin export) file? I’ve also tried connecting through the console with Mysql with connection details and reports 2003 'can’t connect to mysql server’ I also have the MySQL shell installed if that helps. I have changed the password to 'Legacy’ as I see that has caused some problems for others.

Not sure what to do other than reinstall wordpress and recover backup? is it not possible to just add the tables and data to the new connection?

thanks very much

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hey there!

I think in this case it may be best to import that phpmyadmin export into your managed database first. You can then make the connection change in your Wordpress settings. To import that database into your managed database you can follow this guide: How to Import MySQL Databases into DigitalOcean Managed Databases There is also a full guide on using Wordpress with managed databases that may be helpful as well: How To Install WordPress with a Managed Database on Ubuntu 18.04

by Mark Drake
WordPress is the most popular CMS (content management system) on the internet. It allows you to easily set up flexible blogs and websites on top of a MySQL backend with PHP processing. In this guide, we'll focus on getting a WordPress instance set up on a managed MySQL database on an Ubuntu 18.04 server.