473,595 Members | 2,474 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

mysqldump restore db syntax

Hi!

I succesfully exported my locally stored db using the following syntax:
mysqldump -u root --password=111 finance > sqlbk.dump

Now I created another empty db finance2 (on the same Mysql server) and
try to restore their my finance db:

mysqldump -u root --password=111 finance2 < sqlbk.dump

Restore begins to run. I get all the "SET" lines printed, but nothing
is imported.

What am I doing worng?

Thanks a lot in advance!
Vadim

Apr 29 '06 #1
2 36739
Vadim wrote:
I succesfully exported my locally stored db using the following syntax:
mysqldump -u root --password=111 finance > sqlbk.dump

Now I created another empty db finance2 (on the same Mysql server) and
try to restore their my finance db:

mysqldump -u root --password=111 finance2 < sqlbk.dump


mysql -u root --password=111 finance2 < sqlbk.dump

mysqldump is only for creating dumbs. For restoring the dump, use mysql.
Apr 29 '06 #2
Many thanks to you :)

Apr 30 '06 #3

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

Similar topics

1
6230
by: Jerry T | last post by:
How can I backup and restore a MySQL DB WITHOUT USING EXEC() MYSQL MYSQLDUMP ?? If I try running exec() and mysqldump, I get Fork warning errors ..
1
1596
by: Dino | last post by:
hello, every night i'm running a simple cronjob which created sql-dumps from serevral web applications using a syntax like this: mysqldump --add-drop-table -uuzzer -hmyhost -pmypw mydatabase table1 table2 table3 > dumpme.sql after this, the sql-dump is packed together with the pages of the website, creating a whole backup-archive.
7
7403
by: Adam Smith | last post by:
Hope this is the right news group!! I did a server upgrade and at the same time did a mysql update from 4.0.12 to Ver 12.22 Distrib 4.0.16 mach1# mysql --version mysql Ver 12.22 Distrib 4.0.16, for portbld-freebsd4.9 (i386) I attempted to restore the DB with
0
1430
by: Adam Smith | last post by:
Hello, I did a server upgrade and at the same time did a mysql update from 4.0.12 to Ver 12.22 Distrib 4.0.16. Essentially, moving from one machine to another. The dump consists of a cluster of databases, not just one and a few Tables. Now I'd like to restore the Database(s) ===>
0
536
by: Kim | last post by:
How do I restore a single database (selectively) from a mysql dump of many databases. ie: I have a server with a few databases on it, I have run: mysqldump --all-databases > all_databases.sql Which has created a nice file ..... Now what do I do if I just want to restore just one of the databases I have just dumped into this file. Thnks for any info.
0
2257
by: mcstayinskool | last post by:
I'm trying to dump a bugzilla installation to a file, then restore it to a different database name (so as to test my db backup system). I use mysqldump to dump it to a file: # mysqldump -u root -p<passwd> (misc. options) bugs > bugs.sql Then try to restore it to an empty DB, "foobar" with this command # mysql -u root -p<passwd> foobar < bugs.sql It fails, with this not-too-helpful error:
1
5533
by: Rajesh Kapur | last post by:
Hello, We are on MySQL 4.0.21 on linux. We use InnoDB tables and foreign key constraints extensively. The mysqldump backs up the database tables in alphabetical order with foreign key constraints defined in the create statement of each table. These foreign key constraints are violated at the time of restore. We have tried the following two solutions... (1) We have tried to backup the database tables in the order of their dependencies....
6
30083
by: Robert Blackwell | last post by:
I want to make a scheduled task in windows to do a mysqldump. Someone gave me this .bat to run but I'm not able to get it to work. REM @echo off for /f "tokens=1" %%i in ('date /t') do set DATE_DOW=%%i for /f "tokens=2" %%i in ('date /t') do set DATE_DAY=%%i for /f %%i in ('echo %date_day:/=-%') do set DATE_DAY=%%i for /f %%i in ('time /t') do set DATE_TIME=%%i
5
3269
by: Richard | last post by:
Hi All, I issued the command: mysqlmysqldump pmtallocmodel_development > K:/_Projects/Ruby/Backup/pmtdev_2006.07.15.txt; I got the response: ERROR 1064 (42000): You have an error in your SQL syntax; check the
0
7883
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8379
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8019
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
5839
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5418
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3873
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3911
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2391
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1490
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.