Find the answers you need
How do I import a .sql file via phpMyAdmin?
You can use phpMyAdmin to import an .SQL file with your database information. To do this:
- Log in to your database via phpMyAdmin (My20i > Manage Hosting > [select package] > phpMyAdmin)
- Choose the database you want to import your .SQL file to from the left hand side.
- Click the Import tab at the top of the page.
- Select Choose File and locate the .SQL file on your device or computer.
- Click Go
The .SQL file will be uploaded and imported to the database you've selected.
For further help there's a video showing how to import and export databases via phpMyAdmin:
20i's shared web hosting offers 1 GB MySQL databases.
Step by step guide: How to import and export a database via phpMyAdmin.
Knowing how to import and export data via phpMyAdmin is pretty useful for example if you're wanting to clone a website so you're moving perhaps a database from one hosting package to another.
Select the hosting package and go to phpMyAdmin
To get started we first want to manage the hosting package that we're doing this on. In the My20i control panel we select the hosting package we want to work in and we'll just select 'Manage' there. Once we've done this if we have the database in place we just want to go to phpMyAdmin.
In phpMyAdmin log in to MySQL database
In phpMyAdmin we then can see a database. This is the database that we've configured beforehand and there we can see an option to log in.
From this point you just want to select 'Sign in'. Once we've done this we can now see the phpMyAdmin my admin interface.
Essentially it's just a GUI in order to manage your SQL database. From here, in order to import we need to select the database from the left-hand side so from here we just go here and click.
Select Import in phpMyAdmin and choose file
Once we've done this we then just want to select the 'Import' option to import. When we've selected import we'll then be given the option to browse our local machine for the SQL file in question.
Here we just press 'Choose file'. Then, all you want to do is select the .SQL file that you've made or that you've been given.
Once you've done that just press 'Open'. From this point, you now just want to select 'Go' and this will then upload the .SQL file. All being well you should then see the following saying that the 'import has successfully finished' etc., and from here we can see that my tables have imported it's just a default WordPress database so it's nothing special but we can indeed see that it has imported.
Export SQL files via phpMyAdmin
So in terms of exporting it's not too difficult it's pretty much the same sort of process. All we want to do is make sure the database is selected as we did so earlier by just selecting it there on the left hand side and then selecting 'Export'.
We have two options here: 'Quick' and 'Custom'. Custom is essentially just a facility that allows you to select which tables are exported with the database dump but for this purpose we just want to select 'Quick' and this will export the database in its entirety.
We can also choose the format here but for this instance you're just wanting 'SQL'. From this point we now just want to select to 'Go'. Once we've selected go this will export the database as we need it to our local machine.
That's essentially how you import and export data via phpMyAdmin.
It can be very useful if you're wanting to clone a database from one hosting package to another. So hopefully this has shown you how to do so or at least import and export a database.
If you have any issues please do get in touch and we'll be more than happy to help.