473,388 Members | 1,382 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

mysql back-up question - *.sql files?

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.
Dec 16 '05 #1
4 1265
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
Dec 16 '05 #2
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" <jo******@heelal.nl> wrote in message
news:43***********************@text.nova.planet.nl ...
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

Dec 16 '05 #3
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).
Dec 16 '05 #4
"tradmusic.com" <tr***********@btinternet.com> wrote in message
news:dn**********@nwrdmz02.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.
Dec 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: William Drew | last post by:
REQUEST FOR DISCUSSION (RFD) unmoderated group comp.databases.mysql This is an invitation to discuss the following proposal to create newsgroup comp.databases.mysql. Please note that YOU...
4
by: Amadeus | last post by:
Hello Everybody! I have a problem with MySQL servers running RedHat 9 (smp kernel 2.4.20) on Intel and MySQL server 4.0.14 (problem also appears on binary distr 4.0.15 and on 4.0.15 I bilt myself...
10
by: Mike | last post by:
I recently had a Microsoft Access 97 database corrupt on me. The setup is a split database (front end/back end) setup with about 10-15 users. This is the first corruption in something like a...
2
by: Beda Christoph Hammerschmidt | last post by:
MySQL, Access, ODBC, Replication Hello, i have a central mysql database that is accesed by multiple clients running MS Access with ODBC. This works fine if Access has a permanent connection...
5
by: smatta | last post by:
I have just installed MySql version 5.0-18 on Red Hat Fedora Core 4. It is running but I cant connect to it using MySql Query Browser running on my pc. >From my pc, I can telnet to the sql...
2
by: David | last post by:
Hi, Has anyone had this problem ? I am using MySQL ODBC 3.51 Driver, with MS Access 2003 and MySQL 4.1.11 standard log. I created my tables in MS Access, then exported them via ODBC to an...
10
by: tuco357 | last post by:
This problem has been vexing me for some time and I thought I should consult the group.... Often times when writing a php script to handle some mysql DB transactions, I must write code that...
0
by: ZoombyWoof | last post by:
Hi. I have ran into a weird thing I just can't find any solution for. I have googled and searched but no luck. The problem is that when I select TIME values from MySQL from python, I get wrong...
2
by: bshumsky06 | last post by:
Hi, I am trying to create stored procedures in MySQL. Does anyone have a suggestion on a good IDE to use. I have been working with the MySQL Query Browser but it generates errors very often and...
11
by: kennthompson | last post by:
Trouble passing mysql table name in php. If I use an existing table name already defined everything works fine as the following script illustrates. <?php function fms_get_info() { $result =...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.