Solved

Create a dump file. question ?

Posted on 2004-04-08
8
1,302 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 
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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Creating and Managing Databases with phpMyAdmin in cPanel.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

630 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