3.1 - Reconfigure MySQL

In this section we’ll update the application configuration to point to our highly-available Lightsail database.

  • From the Lightsail console home page select Databases from the horizontal menu

  • Click on the name of the Lightsail database you created earlier

  • Under Connection details copy the value for Endpoint.

  • In the ToDo application click settings from the top menu

  • Paste in the endpoint value of your Lightsail database under DB Hostname. Enter dbmasteruser for the DB Username, and taskstasks for the DB Password. Finally click save settings.

  • Test the new database by clicking List Tasks in the top menu. Since you have pointed the front-end at a the new database there shouldn’t be any tasks to display. Also note at the bottom of the screen it should list your Lightsail database endpoint as value for Database host
If your web app is still showing the previously deployed database (denoted by `localhost` as the database host), you may need to use either a new browser window or an incognito window.