OK – I was looking for a way to do this and there aren’t too many articles that explain exactly how to import a database via Webmin control panel. So what if you need to import a new database using webmin control panel or you want to overwrite an existing database using the Webmin interface software and control panel? Well here are the steps how to import and over-write an already existing database with a new database that shares the same tables and structure;
How to import a database to Webmin control panel
Now – assuming you have downloaded a copy of your database and have an SQL file ready to import – here’s how to import a new database sql file into Webmin via sql commands to overwrite a database already on the server (these SQL commands are executed for you if you follow these steps);
- Log into your Webmin Control Panel (ex: https://yourdomain.com:10000)
- Go to Servers > MySQL Database Sever.
- Under MySQL Databases – select your database.
- Select Execute SQL.
- Select the tab Run SQL From File.
- Select either; From local file (select a file from your server) or From uploaded file (upload a file from your computer).
- Click Execute.
- Your MySQL database should now be imported!
WARNING: backup your existing database on the sever you are overwriting first!