Solved

Create a dump file. question ?

Posted on 2004-04-08
8
1,289 Views
Last Modified: 2011-08-18
Hi all

Does any one have a commandstring on how execute / create a dump file from a mysqldatabase
"on a localhost"

Id tryed this in the commanline

c:\mysql\bin\mysqldump.exe --all-databases

But im only reciveing this errormessage: access denied odbc@localhost: using password=no
when trying to connect  

So how can i write a command text  that does somethig like this ?

1)c:\mysql\bin\mysqldump.exe --mytestDB ,username=test, password=test
   and write the data into c:\mytestDB.txt (dumpfile)

2) I simply want to execute  the dump procedure from the command promt  " c:\"

Hope any have a suggestion or a link to this procedure. please not mysql.com chapter 8.8 manual


rgds jens

   
0
Comment
Question by:vbturbo
  • 5
  • 3
8 Comments
 
LVL 9

Expert Comment

by:Alf666
Comment Utility
c:\mysql\bin\mysqldump.exe --all-databases -u your_mysql_admin_user -p your_mysql_admin_password
0
 
LVL 18

Author Comment

by:vbturbo
Comment Utility
Hi

i tryed this and this is the responce i get

C:\mysql\bin>mysqldump.exe hssh -u jens -p lasse
Enter password: *****                                
-- MySQL dump 9.10
--
-- Host: localhost    Database: hssh
-- ------------------------------------------------------
-- Server version       4.0.18-nt                      
mysqldump.exe: Can't get CREATE TABLE for table `lasse` (Table 'hssh.lasse' does
n't exist)

I got 7 tables in the database hssh ! witch i want write into  1     log or dump file
since ,when im trying to backup "hssh" from the latest mySQLadminstrator it can't handle
the keys   Æ,Ø,Å   when im restoring the tabledata into my webserver
i thought that i could override this with a dumpfile and then import it via myphp on
my webhost regardless som of the field data conains  æ,ø,å   seems mySQL has forgot the foreignkeys.

any way lasse a password not a tablename

hope you got another joker ?

thanks in advance

 rgds jens







0
 
LVL 9

Expert Comment

by:Alf666
Comment Utility
Yes, I actually do. Sorry for this typo. The "-p" option does take a parameter, but it must be stuck. Thus, it took your "lasse" argument as the table name.

C:\mysql\bin>mysqldump.exe hssh -u jens -plasse

Will work much better :-)
0
 
LVL 9

Expert Comment

by:Alf666
Comment Utility
Actually, do not forget the --all-databases argument :

mysqldump.exe hssh -u jens -plasse --all-databases

you might also want to add the following :

--add-drop-table
and
-a

So :

mysqldump.exe hssh -u jens -plasse --all-databases -a --add-drop-table
0
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 
LVL 9

Accepted Solution

by:
Alf666 earned 50 total points
Comment Utility
Argl. I should read better. Do not leave your db name.

mysqldump.exe -u jens -plasse --all-databases -a --add-drop-table

Or, for just one db :

mysqldump.exe -u jens -plasse -a --add-drop-table hssh
0
 
LVL 18

Author Comment

by:vbturbo
Comment Utility
Hi

please carry over with me im a bit newbie  to the mySQL world


it worked succesfully but where did dumpfile.txt/logfile.txt go ?
i checked  the folder C:\mysql\data\hssh   and C:\

2)mysqldump.exe hssh -u jens -plasse --all-databases -a --add-drop-table
   is this defineing the assigned priviliges  "  add-drop-table " ?

sorry but had enought the speed of ms access 2000 and the price's msSQL servers

rgds jens
0
 
LVL 18

Author Comment

by:vbturbo
Comment Utility
Hi

Again whent into myphp and it worked just fine

just wonder about if i should file a bug rep. to mysql about the missing foreing key option
in regard to there new release of mySQL administrator version ?

BUT Thanks a lot !save me a lot of headacke

rgds jens  
0
 
LVL 9

Expert Comment

by:Alf666
Comment Utility
The output file can be determined by the "-r filename" option.

The --add-drop-table is a switch that will instruct mysqldump to add a "drop table" statement in your dump. Useful for a backup.

I suggest you do a mysqldump.exe --help for the full options
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I have been using r1soft Continuous Data Protection (http://www.r1soft.com/linux-cdp/) for many years now with the mySQL Addon and wanted to share a trick I have used several times. For those of us that don't have the luxury of using all transact…
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now