Solved

Create a dump file. question ?

Posted on 2004-04-08
8
1,292 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
 
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
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
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

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How can i Install a new Data Source on Visual Studio 2 95
php image upload 3 37
Insert with SET how to handle join 6 59
PHP: concatenate query 13 45
A lot of articles have been written on splitting mysqldump and grabbing the required tables. A long while back, when Shlomi (http://code.openark.org/blog/mysql/on-restoring-a-single-table-from-mysqldump) had suggested a “sed” way, I actually shell …
Fore-Foreword Today (2016) Maxmind has a new approach to the distribution of its data sets.  This article may be obsolete.  Instead of using the examples here, have a look at the MaxMind API (https://www.maxmind.com/en/geolite2-developer-package). …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

864 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

21 Experts available now in Live!

Get 1:1 Help Now