If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > mysqldump

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-05-11, 07:16
melgra70 melgra70 is offline
Registered User
 
Join Date: Mar 2011
Location: Sydney, Australia
Posts: 58
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.
Reply With Quote
  #2 (permalink)  
Old 10-05-11, 13:16
it-iss.com it-iss.com is offline
Registered User
 
Join Date: Sep 2009
Location: San Sebastian, Spain
Posts: 620
What is the exact syntax of the command you are running (blank off passwords and hostnames)?
__________________
Ronan Cashell
Senior Oracle/MySQL DBA
http://www.it-iss.com
Reply With Quote
  #3 (permalink)  
Old 10-05-11, 15:52
melgra70 melgra70 is offline
Registered User
 
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
Reply With Quote
  #4 (permalink)  
Old 10-05-11, 16:18
it-iss.com it-iss.com is offline
Registered User
 
Join Date: Sep 2009
Location: San Sebastian, Spain
Posts: 620
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
Senior Oracle/MySQL DBA
http://www.it-iss.com
Reply With Quote
  #5 (permalink)  
Old 10-05-11, 16:27
melgra70 melgra70 is offline
Registered User
 
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.
Reply With Quote
  #6 (permalink)  
Old 10-06-11, 07:29
melgra70 melgra70 is offline
Registered User
 
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?
Reply With Quote
  #7 (permalink)  
Old 10-06-11, 08:22
healdem healdem is online now
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,250
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 my Versys or my Tiger 800 let alone the Norton
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On