Importing data into your MySQL database in Amazon Lightsail
Last updated: March 15, 2019
You can import a SQL file (.SQL) into your MySQL managed database in Amazon Lightsail using MySQL Workbench.
To learn how to connect MySQL Workbench to your database, see Connecting to your MySQL database in Amazon Lightsail.
Open MySQL Workbench.
In the list of MySQL Connections, choose your MySQL managed database in Amazon Lightsail.
Choose Data Import/Restore from the left-navigation menu.
In the Data Import pane, choose Import from Self-Contained File under the Import Options section.
Choose the ellipsis button to browse your local drive for the .SQL file that you want to import.
Choose the .SQL file to import, then choose Open.
Choose the Default Target Schema drop-down menu, then select the existing database to import the file to. You can also create a new database by choosing New.
Choose Start Import to start the import.
Your import may take a few minutes or more depending on the size of the .SQL file. After the import is complete, you should see a message similar to the following:
To import data into your database