Import MySQL database

I’d recommend doing something like the following to import a MySQL database:

  1. Follow this guide to hosting a MySQL database on Render.
  2. Use mysqldump to get a backup file for the existing database.
  3. Use magic wormhole to transfer the backup file to your mysql Render service.
  4. Import the backup file that you just transferred with the mysql CLI.

For steps 3 and 4 you’ll need to use the built-in Shell in the Render dashboard. I’m happy to elaborate on any of these steps :slight_smile:

@david thanks for the steps
I can’t do Step2:

bash-4.4# mysqldump --all-databases
mysqldump: Got error: 1045: Access denied for user 'root'@'localhost' (using password: NO) when trying to connect

Hi there,

The error you shared looks like your existing database requires some specific credentials or password to connect to MySQL. Maybe these connection details are listed in cPanel (mentioned in another of your posts)?

Hope that helps

Kind regards

Alan