|
Home > Archive > MySQL Server Forum > December 2005 > mysql back-up question - *.sql files?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
mysql back-up question - *.sql files?
|
|
| tradmusic.com 2005-12-16, 9:23 am |
| Hi,
Newbie question...
We have an online catalogue running off a mysql database, which we can back
up. When we back it up, it creates a file online called "database.sql"
which, when opened in Notepad starts...
DROP TABLE IF EXISTS store_category;
CREATE TABLE store_category (
category text NOT NULL,....etc
If we want to transfer our database to a different host, how would we upload
this .sql file into our new mysql database (on the new server)?
Thanks.
Nath.
| |
| Jonathan 2005-12-16, 11:23 am |
| tradmusic.com wrote:
> Hi,
>
> Newbie question...
>
> If we want to transfer our database to a different host, how would we upload
> this .sql file into our new mysql database (on the new server)?
>
> Thanks.
> Nath.
>
>
First create the database:
mysqladmin create [database]
mysql -u [user] -p [database] < [filename.sql]
Where;
* [user] is the username with the proper rights to create and import
databases, for instance the root account
* -p is added to prompt for a password
* [database] is the name of the (just) created database
* [filename.sql] is the filename of the SQL dump file.
Good luck!
Jonathan
| |
| tradmusic.com 2005-12-16, 11:23 am |
| Thank you Jonathan.
Please excuse my ignorance of MySQL, but our host company simply creates the
database for us, and sends us the access details.
I guess I'm therefore wondering how I upload the .sql dump file into it?
<embarrassed face> :o) !
Much appreciated
Nath.
"Jonathan" <jonathan@heelal.nl> wrote in message
news:43a2e2b9$0$1007
7$ba620dc5@text.nova.planet.nl...
> tradmusic.com wrote:
>
> First create the database:
>
> mysqladmin create [database]
>
> mysql -u [user] -p [database] < [filename.sql]
>
> Where;
> * [user] is the username with the proper rights to create and import
> databases, for instance the root account
> * -p is added to prompt for a password
> * [database] is the name of the (just) created database
> * [filename.sql] is the filename of the SQL dump file.
>
> Good luck!
>
> Jonathan
| |
|
| tradmusic.com wrote:
> Please excuse my ignorance of MySQL, but our host company simply creates the
> database for us, and sends us the access details.
>
> I guess I'm therefore wondering how I upload the .sql dump file into it?
The same way you normally transfer files to a server. We use WinSCP for
secure transfers if server supports ssh, but if that isn't available,
there usually is FTP service (For example Filezilla can be used to
transfer via FTP).
| |
| Bill Karwin 2005-12-16, 1:23 pm |
| "tradmusic.com" <tradmusic.com@btinternet.com> wrote in message
news:dnuqe0$e4b$1@nw
rdmz02.dmz.ncs.ea.ibs-infra.bt.com...
> Please excuse my ignorance of MySQL, but our host company simply creates
> the database for us, and sends us the access details.
>
> I guess I'm therefore wondering how I upload the .sql dump file into it?
> <embarrassed face> :o) !
How do you upload any other file to the hosting company's servers? FTP?
SCP? WebDAV?
Once the .sql file is there, the hosting company probably has some web-based
MySQL administration application, and the most popular one for this kind of
situation is phpmyadmin. You need to confirm this with the hosting company.
You should really be talking to your hosting company with these questions,
since so much of the answer depends on how they set it up. Don't worry
about appearing ignorant. It's no negative reflection on you that you don't
know software that is new to you. You just don't know it _yet_.
Regards,
Bill K.
|
|
|
|
|