aspose file tools*
The moose likes JDBC and the fly likes Back of database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Back of database" Watch "Back of database" New topic
Author

Back of database

Mahesh Lohi
Ranch Hand

Joined: Jun 22, 2009
Posts: 151
Hi I am facing a problem taking the backup of my DB. mysqldump command shows error. I am using mysql 5.1.. Please help.

Thankyou in advance

Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30973
    
159

Mahi Lohi wrote:mysqldump command shows error.

You're likely to get more specific help if you share more information. Let's start with - what was the error message?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Mahesh Lohi
Ranch Hand

Joined: Jun 22, 2009
Posts: 151
Jeanne Boyarsky wrote:
Mahi Lohi wrote:mysqldump command shows error.

You're likely to get more specific help if you share more information. Let's start with - what was the error message?




Am using mysql 5.1

C:\>mysqldump -r root -p password DBName> fileName.sql.

It shows mysqldump is not recognized as internal or external command, operable program or batch file.

However the file to which I like to take the back up is created with no data in it.

Thank you,
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2510
    
  10

Hi,

the file is created because you use >
This will tell the operating system to create the file, and has nothing to do with mysql.

To be able to run the mysqldump program, you will have to:
  • navigate to the directory where the mysqldump executable is located, and run it from there - or
  • add the path when you run the command ( "c:\progr...\mysq...\mysqldump.exe" -r root -p password DBName> fileName.sql) - or
  • Add the path to the mysql binaries to your operating system PATH


  • OCUP UML fundamental and ITIL foundation
    youtube channel
    Mahesh Lohi
    Ranch Hand

    Joined: Jun 22, 2009
    Posts: 151
    Jan Cumps wrote:Hi,

    the file is created because you use >
    This will tell the operating system to create the file, and has nothing to do with mysql.

    To be able to run the mysqldump program, you will have to:
  • navigate to the directory where the mysqldump executable is located, and run it from there - or
  • add the path when you run the command ( "c:\progr...\mysq...\mysqldump.exe" -r root -p password DBName> fileName.sql) - or
  • Add the path to the mysql binaries to your operating system PATH


  • I executed the way you have mentioned but then it is asking me for password and gives me an error of this kind after entering the password


    mysqldump: Got error :1045 :access denied for user "ODBC" @localhost (using password: Yes) When trying to connect...

    Thank you in advance

    Jan Cumps
    Bartender

    Joined: Dec 20, 2006
    Posts: 2510
        
      10

    Do you have a MySQL user named ODBC that has the correct rights?
    Mahesh Lohi
    Ranch Hand

    Joined: Jun 22, 2009
    Posts: 151
    Jan Cumps wrote:Do you have a MySQL user named ODBC that has the correct rights?



    I have no user named ODBC. I am using Netbean IDE , with jdbc odbc connection .. Does this make a difference..



    Thank you
    Vijitha Kumara
    Bartender

    Joined: Mar 24, 2008
    Posts: 3855

    Mahi Lohi wrote:I have no user named ODBC. I am using Netbean IDE , with jdbc odbc connection .. Does this make a difference..


    By looking at your previous post you are executing the mysql commands from the command line right? So I think this has nothing to do with the Netbeans. You should have username/password to access mysql DB. Read this for more details.


    SCJP 5 | SCWCD 5
    [How to ask questions] [Twitter]
    André Asantos
    Ranch Hand

    Joined: Nov 23, 2009
    Posts: 234
    How can I make the backup of my MySQL database step by step please?
    Vijitha Kumara
    Bartender

    Joined: Mar 24, 2008
    Posts: 3855

    André Asantos wrote:How can I make the backup of my MySQL database step by step please?

    MySQL backup methods.
    Mahesh Lohi
    Ranch Hand

    Joined: Jun 22, 2009
    Posts: 151
    Thnak you for your replies
     
    jQuery in Action, 2nd edition
     
    subject: Back of database