Solved

Create a dump file. question ?

Posted on 2004-04-08
8
1,295 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
ID: 10787562
c:\mysql\bin\mysqldump.exe --all-databases -u your_mysql_admin_user -p your_mysql_admin_password
0
 
LVL 18

Author Comment

by:vbturbo
ID: 10787887
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
ID: 10787912
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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 9

Expert Comment

by:Alf666
ID: 10787925
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
 
LVL 9

Accepted Solution

by:
Alf666 earned 50 total points
ID: 10787984
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
ID: 10788034
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
ID: 10788153
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
ID: 10789911
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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

All XML, All the Time; More Fun MySQL Tidbits – Dynamically Generate XML via Stored Procedure in MySQL Extensible Markup Language (XML) and database systems, a marriage we are seeing more and more of.  So the topics of parsing and manipulating XM…
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 …
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.

813 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

14 Experts available now in Live!

Get 1:1 Help Now