Backup your mysql Database once and a while.
- Navigate to http://localhost:9091/
- On the left click New
- For the Database name type: TestDataBase
- Click Create
- At the top, click Import.
- Chose File
- Navigate to the TestDataBase.sql file.
- Click "Go"
This is how to successfully restore a database
Data for my sql is stored in the .mysql-data folder. Do not delete this folder or the contents of this folder. Also, you might not want to push this folder to github, and that is why there is a .gitignore file. You might want to share the database with team members, so use the Export functionality in PhpMyAdmin to export sql files which represents your entire database.
If you want to start will a completely empty database Make sure you backup your sql database in phpmyadmin
Then, in VSCode:
- click on "Remote Explorer"
- click "Other Containers"
- right click "VSCodeLampStackDocker_devcontainer (/VSCodeLampStackDocker_devcontainer_mysql-server_1)"
- click "Remove Container"s
Now you can Ctrl Shift P, and Rebuild Container. You will have a completely fresh mysql server running. Don't forget to Create the Database name again in phpmyadmin first, when you are ready to restore from a sql file