473,288 Members | 2,725 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,288 software developers and data experts.

exporting & importing database

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 5628
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
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 Expert 1GB
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 Expert 1GB
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 Expert 1GB
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 Expert 1GB
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
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
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
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
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
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
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
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
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
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
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.