Results 1 to 7 of 7

Thread: mysqldump

  1. #1
    Join Date
    Mar 2011
    Location
    Sydney, Australia
    Posts
    58

    Unanswered: mysqldump

    What could be a reason for mysqldump producing an empty backup file?
    There was no error message when I ran mysqldump but the resultant .sql file is empty.

  2. #2
    Join Date
    Sep 2009
    Location
    San Sebastian, Spain
    Posts
    880
    What is the exact syntax of the command you are running (blank off passwords and hostnames)?
    Ronan Cashell
    Certified Oracle DBA/Certified MySQL Expert (DBA & Cluster DBA)
    http://www.it-iss.com
    Follow me on Twitter

  3. #3
    Join Date
    Mar 2011
    Location
    Sydney, Australia
    Posts
    58
    CD C:\program files (x86)\mysql\mysql Server 5.1\bin\
    mysqldump –u hostname –p mydb > mydbbackup1sql
    Enter Password:*****

    I don't use the password in the script, so it gives me a prompt for the password.
    I run the command prompt as administrator.

    Prior to the restore process, I was told to move the folder containing the backup (CommandLine) to the root directory, as the teacher believed the long file path was causing problems. This then is the restore script:

    mysql –u hostname –p mydb<c:\commandline\mydbbackup1.sql

  4. #4
    Join Date
    Sep 2009
    Location
    San Sebastian, Spain
    Posts
    880
    Try using the following parameter from the mysqldump:

    -r, --result-file=name
    Direct output to a given file. This option should be used
    in MSDOS, because it prevents new line '\n' from being
    converted to '\r\n' (carriage return + line feed).

    Also if you look at the mysqldump script you are redirecting to mydbbackup1sql and I think this should be mydbbackup1.sql as you calling this below in the restore.
    Ronan Cashell
    Certified Oracle DBA/Certified MySQL Expert (DBA & Cluster DBA)
    http://www.it-iss.com
    Follow me on Twitter

  5. #5
    Join Date
    Mar 2011
    Location
    Sydney, Australia
    Posts
    58
    Thanks, Ronan.
    Sorry, the first two lines were two separately run scripts, one to change the directory, then the dump script.
    When I can get to the laptop a little later, I'll try your point about the .sql suggestion, which makes sense.
    Thank you.

  6. #6
    Join Date
    Mar 2011
    Location
    Sydney, Australia
    Posts
    58

    mysql administrator logs

    Your solution was one key, Ronan. The other was that I changed from a copy and paste to a manual type. The dumps and restores worked beautifully - thank you.
    However, I have another problem. I have set the startup variables in MySQL Administrator as Querymydb; Errormydb and Updatemydb, with the Binlog Options set as Log updates for mydb. The Option File chosen as the default was C:\Program Files (x86)\MySQL\MySQL Server 5.1\my.ini
    I have examined that directory and the log files aren't there.
    I've done a global search on *mydb*; I've examined many folders, including the Windows installation directory as suggested in the Administrator Help menu.
    However, I've not been able to find any logs by these file names.

    I'm not sure whether the fact that I'm running through Wamp Server would cauase any changes of location, but I assumed that the Option File location indicated by Administrator would be where I would expect to find the files.
    Are there any suggestions as to anywhere I can look to find the logs I need to submit? Has anyone else experience this?

  7. #7
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    new problem, new thread please
    dems dare rules
    why?
    other contributors may recognise the old thread and think its already been answered or don't think they've got anything to contribute
    but perhaps more importantly its starting a new thread for a new question may men that someone else with the same problem can find solutions to your problems that may help them... something they may not recognise if the thread is mis, or ambiguously titled and they may give up reading the thread if the firs 'n' posts are irrelevant to their current problem
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •