Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Create a dump file. question ?

Posted on 2004-04-08
8
Medium Priority
?
1,312 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
Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

 
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 200 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

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

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

Containers like Docker and Rocket are getting more popular every day. In my conversations with customers, they consistently ask what containers are and how they can use them in their environment. If you’re as curious as most people, read on. . .
In this blog post, we’ll look at how using thread_statistics can cause high memory usage.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

972 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