473,507 Members | 2,472 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

exporting & importing database

35 New Member
i am doing the programming at home and our teacher checks it in school that's why i need to export/import my database.. but i dont know how..
i've found this instruction on the net but i cant understand

1. Export A MySQL Database
This example shows you how to export a database. It is a good idea to export your data often as a backup.

# mysqldump -u username -ppassword database_name > FILE.sql

Replace username, password and database_name with your MySQL username, password and database name.

File FILE.sql now holds a backup of your database, download it to your computer.

2. Import A MySQL Database

Here, we import a database. Use this to restore data from a backup or to import from another MySQL server.

Start by uploading the FILE.sql file to the server where you will be running this command.

# mysql -u username -ppassword database_name < FILE.sql

Replace the parts in red with your own information.

This powerful, easy to use command has many uses. Let's say you wanted to switch web hosting providers.

Simply export your data on the old provider's server and import it on your account with the new host.


in #1 it says that i have to download "FILE.sql" to my computer.. but the problem is i dont know where will i find "FILE.sql"
Feb 9 '08 #1
6 5642
sandeepsandeep
50 New Member
Give th efull path of the local machine and directory insteed of the File.sql gives the C:\mydata\filename.sql
Feb 9 '08 #2
mirianCalin
35 New Member
Give th efull path of the local machine and directory insteed of the File.sql gives the C:\mydata\filename.sql
what do you mean by "local machine"? i cant understand what you're instructing me.. kindly explain further
Feb 10 '08 #3
ak1dnar
1,584 Recognized Expert Top Contributor
what do you mean by "local machine"? i cant understand what you're instructing me.. kindly explain further
Mirian, you haven't tell us about the operating system that you are using. What sandeepsandeep is saying actually if you are using a windows machine (Local Machine == Your PC), set the full path to save the file.
Expand|Select|Wrap|Line Numbers
  1. mysqldump -u<username> -p database_name >  /path/to/filename.sql
Feb 10 '08 #4
hsriat
1,654 Recognized Expert Top Contributor
i am doing the programming at home and our teacher checks it in school that's why i need to export/import my database.. but i dont know how..
i've found this instruction on the net but i cant understand

1. Export A MySQL Database
This example shows you how to export a database. It is a good idea to export your data often as a backup.

# mysqldump -u username -ppassword database_name > FILE.sql

Replace username, password and database_name with your MySQL username, password and database name.

File FILE.sql now holds a backup of your database, download it to your computer.

2. Import A MySQL Database

Here, we import a database. Use this to restore data from a backup or to import from another MySQL server.

Start by uploading the FILE.sql file to the server where you will be running this command.

# mysql -u username -ppassword database_name < FILE.sql

Replace the parts in red with your own information.

This powerful, easy to use command has many uses. Let's say you wanted to switch web hosting providers.

Simply export your data on the old provider's server and import it on your account with the new host.


in #1 it says that i have to download "FILE.sql" to my computer.. but the problem is i dont know where will i find "FILE.sql"

There is one simple solution for your problem....
Use HEIDI SQL (free download)

http://www.heidisql.com/

Just a button will do the whole job..

(Open both the connections in different Heidi SQL window and then click on the export button in the one whom you want to export.)
Feb 10 '08 #5
ak1dnar
1,584 Recognized Expert Top Contributor
There is one simple solution for your problem....
Use HEIDI SQL (free download)

http://www.heidisql.com/

Just a button will do the whole job..

(Open both the connections in different Heidi SQL window and then click on the export button in the one whom you want to export.)
Why not MySQL GUI tools And phpMyAdmin
Feb 10 '08 #6
hsriat
1,654 Recognized Expert Top Contributor
Why not MySQL GUI tools And phpMyAdmin

ummm...
Actually I exported my database using heidiSQL, and I found it easy to use than phpMyAdmin.

I haven't used used My SQL GUI tools..., but this migration tool seems to be interesting...
Feb 10 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

5
3176
by: Ville Rontti | last post by:
Hi I have two separate databases (A and B). Both databases have one table (A). How I could transfer the contents of table A from Database A to database B table A? The tables are same. Ville
2
2299
by: Sara | last post by:
Hi - I've been reading the posts for a solution to my query, and realize that I should ask an "approch" question as well. We receive our production data from a third party, so my uers import...
2
3036
by: deko | last post by:
I use a complied query to export to Excel like this: SELECT * INTO . FROM tblExcelData; But I have a situation where I need to export several tables into the same worksheet. The idea is to...
1
2451
by: Luis Esteban Valencia | last post by:
Hello Everyone, Iam an intermediate ASP.Net programmer and iam facing a challenging task. I have a table in MS-SQL server database called 'Members'. The table has following fields... ...
11
2285
by: MLH | last post by:
Anyone ever experiement importing WAB data directly into A97? Would lke a chance to look at any work done in this arena.
2
3159
by: Snozz | last post by:
The short of it: If you needed to import a CSV file of a certain structure on a regular basis(say 32 csv files, each to one a table in 32 databases), what would be your first instinct on how to...
0
1501
by: Mike Collins | last post by:
I am trying to export data from multiple tables in SQL Server to an XML file so I can then import it to another database. It seems to be working fine for exporting, but I am having trouble...
1
7603
by: John Overton | last post by:
I have a new requirement to Import and Export Excel tables into and out of Access 2003. The Excel tables are located on a remote server but I know the path to the Excel Files. Can you please help...
4
1280
by: Zippy | last post by:
Rather a long saga. I recently converted an Access 97 db to 2003. The FE links in tables from db1 & db2. All was working fine. Then, out of the blue (about an hour before I was due to give a...
0
7223
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7321
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
7377
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7488
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5623
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5045
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
762
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
412
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.