Got a dump of a database that you need to import in to a new or exiting database for a site?  There are a couple of ways of doing this, let's start with through the Hosting platform.


Log in to the Hosting platform:


https://app.nimbushosting.co.uk/


From the Dashboard you can select the site you need to import the database to and then select php & Databases on the left hand side.  Here you will see all your current databases listed.  You can either add a new one by clicking Add Database.  You'll see a box appear below it where you can enter a name for your new database, then click Create Database.  If you're using an existing database you can skip to the next step.


Log in to phpMyAdmin by clicking on the cog to the right hand side of the database.



You'll see a pop up displaying the username and password for the database which you will need to login to phpMyAdmin, you can click on either one to copy it in to the log in screen.  Click Open phpMyAdmin to proceed to the login screen and enter the details.


Once you've logged in, select the database on the left and then click Import along the top.



Select Choose File and browse your device for the database dump, select it and then press Go and the database should import.



This option can have issues if your internet connection is slow or if the database is large.  If you're not successful using the above method then it may be best to import the MYSQL dump via SSH.  A copy of the database needs to be on the server for this method to work.  You can upload it via FTP, here's how to find your FTP details:


Accessing your FTP details


Log in via SSH


Here's how you find your SSH log in details and how to connect via SSH:


Accessing your SSH details

How to Connect Via SSH


Change directory to the folder where you uploaded your MYSQL dump and run your import command.  Here's a suggestion, but there are others out there that you can use:


mysql -u <DBusername> -p <DBname> < <DBDumpname.sql>


Example: mysql -u dbusername -p dbname < dbdump.sql


In my example when you hit enter it will ask you for the database password and then import the database.