Help - Search - Members - Calendar
Full Version: MySQL how to get database onto server
The Planet Forums > Control Panels > Plesk
Mel
Hi,

Can anyone please help

I have developed and tested a database with test records
using MySQL on my offline PC - How do I get the database, tables
and records up onto my server as there does not seem to be an
import facility when I log into my actual domain ?

Thanks - Mel:confused:
ideasmultiples
Use phpmyadmin to export data in old server and same to import in new server.

Other option is export data with mysqldump and import in new server whit phpmyadmin or directly whit mysql client from command line.
Mel
OK thanks
Squire
You've got something to export it already, right?

You'll also need to have the ability to create a database on your server if it's not already set up. If you log into the Plesk control panel (or any other for that matter) it'll have a database administration area. In there you can create a database, user and give it a password. There's also software there that'll allow you to import your .sql file.
Mel
QUOTE (Squire)
You've got something to export it already, right?

You'll also need to have the ability to create a database on your server if it's not already set up.  If you log into the Plesk control panel (or any other for that matter) it'll have a database administration area.  In there you can create a database, user and give it a password.  There's also software there that'll allow you to import your .sql file.


Yes the exporting was not a problem

I have now also manged to import into the database by using SSH but more by luck than judgement I think

The problem was that I could not see anyway of importing anything in via phpmyadmin there is an export tab but NO import tab

Me and SSH and command lines don't get on, guess it's the fear of the unknown and lack of practice

Still the tables and data appear to be there and intact, but it would have been a lot more straightforward if there had been an import tab in phpmyadmin page - Should there be?

Mel
Squire
They just don't call it that. Never have, which never made a lot of sense to me either.

It probably depends a bit upon the version of phpMyAdmin, but what you're looking for is going to be labeled as SQL or something close to that. That area should let you run SQL commands, or upload and run a SQL file you've exported from elsewhere.
Mel
QUOTE (Squire)
They just don't call it that.  Never have, which never made a lot of sense to me either.  

It probably depends a bit upon the version of phpMyAdmin, but what you're looking for is going to be labeled as SQL or something close to that.  That area should let you run SQL commands, or upload and run a SQL file you've exported from elsewhere.



Hi,

Yes it was labeld SQL and had the browse button to enable you to upload

IT would not allow me to upload a file into the table so I moved the table and renamed it with a backup name then dropped the original table and uploaded the whole table from my PC and it has worked

Not quite sure why it would not just take records but it is a start, so I will do some more investigating

Thanks for the tip:)

Regards - Mel
James Jhurani
since you exported it already, I assume it is in a file... database.sql...

Upload the file to the server using ftp or whatever method you prefer, then at the command prompt type:

mysql -u -p dbname < dbname.sql

-James
Mel
Thanks for your help everyone, have got it working now

Mel:)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.