473,406 Members | 2,847 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

mysql dump doesn't work anymore

A while ago I had some help from here to make a batch file that would dump
my db. Everything was working just fine until 2 days ago and I just found
out.

I checked my backup folder and found that starting on 4/25/2006 the dump
files are empty and only shows a few lines of comments or something instead
of creating a normal dump as it had been doing just fine for the last few
weeks.

Quote:
-- MySQL dump 10.9
--
-- Host: localhost Database: test
-- ------------------------------------------------------
-- Server version 4.1.14-nt

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS,
FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

I don't know what all of a sudden caused the mysql dumps to stop working. I
have not made any changes to the mysql server other then adding a new db or
2 and user. I am getting this problem when I try dumping any of the dbs I
have. All I know is that just by looking at the file date created, the last
backup it was able to create succesfully was on 4/24/2006 1:58pm

Please help.
May 5 '06 #1
4 3677
Robert Blackwell wrote:
I don't know what all of a sudden caused the mysql dumps to stop working. I
have not made any changes to the mysql server other then adding a new db or
2 and user.


What user do you use when running the mysqldump command? Does that user
have both SELECT and LOCK TABLES privilege on the databases? In other
words, if you do this:

mysqldump --user=mybackupuser --password=foo databasename > dump.sql

Then mybackupuser must have the privileges on the database.

When you try the mysqldump command manually at a shell prompt, do you
see any error message? Or does it appear to succeed, but generates an
empty output file?

Regards,
Bill K.
May 5 '06 #2
Hi Bill, I'm running this as a scheduled task or by double clicking it.
There appears to be no error when it runs. I don't know how to use shell.

Here's the script that you helped me with last time. It was working just
perfectly until the 25th and I honestly have no clue what has changed.

REM @echo off

for /f "tokens=1" %%i in ('date /t') do set DATE_DOW=%%i

for /f "tokens=2" %%i in ('date /t') do set DATE_DAY=%%i
for /f %%i in ('echo %date_day:/=-%') do set DATE_DAY=%%i
for /f %%i in ('time /t') do set DATE_TIME=%%i
for /f %%i in ('echo %date_time::=-%') do set DATE_TIME=%%i
"C:\Program Files\MySQL\MySQL Server 4.1\bin\mysqldump" -u
anyuser -p"password" anydatabase >"C:\Documents and
Settings\Administrator\My
Documents\mysqldump\"%DATE_DAY%_%DATE_TIME%_anydat abase.sql

I remember last time it was a problem with lock tables and after checking
and granting lock tables it worked. But right now I'm even trying with Root!
and it is still not working.

I'm double checking as I type and what the heck! My users dont' have lock
permissions anymore. Something somehow must have removed those permissions
on april 24th evening or 25th morning...

I use this program called mysql yog and in its permissions manager there
isn't a lock option just select and everything else. So I loaded this
program called mysql front to grant lock tables and it can also show the
code for permissions so like on this one user it has

GRANT LOCK TABLES ON *.* TO 'wowcentral'@'%' IDENTIFIED BY PASSWORD
'69c4a4d359c7dd6b';
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX,
ALTER, LOCK TABLES ON `amazon shop`.* TO 'wowcentral'@'%';
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX,
ALTER, LOCK TABLES ON `smftest`.* TO 'wowcentral'@'%';
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX,
ALTER, LOCK TABLES ON `test`.* TO 'wowcentral'@'%';
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX,
ALTER, LOCK TABLES ON `wowc`.* TO 'wowcentral'@'%';
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX,
ALTER, LOCK TABLES ON `wowcguild`.* TO 'wowcentral'@'%';
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX,
ALTER, LOCK TABLES ON `wowcmambo`.* TO 'wowcentral'@'%';

It really doesn't look like a permissions issue since that code clearly
shows lock tables, and plus, root doesn't even work either.

So frustrating.
May 5 '06 #3
Robert Blackwell wrote:
GRANT LOCK TABLES ON *.* TO 'wowcentral'@'%' IDENTIFIED BY PASSWORD
'69c4a4d359c7dd6b';
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX,
ALTER, LOCK TABLES ON `amazon shop`.* TO 'wowcentral'@'%';


These two lines describe the privileges of different logins. You get
one set of privileges when you supply the password, you get a different
set of privileges when you supply no password.

In the case above, the account name 'wowcentral' seems to have a bunch
of privileges when it logs in with no password (that is from the second
line). When the password is given, the account by the same name has
only LOCK TABLES and no other passwords.

MySQL is very flexible when it comes to privileges. So flexible, that
it is often confusing. MySQL permits the same account name to have
different privileges, depending on which password is given, or if no
password is given. That's why the "IDENTIFIED BY" clause is optional.
Leave it out, and you're describing the privileges in the case when the
username is specified, but no password is.

Likewise, the "-p" option of MySQL command-line tools is optional.
Leave that option out, and you're logging in using the specified account
name, but no password.

Regards,
Bill K.
May 6 '06 #4
It turns out some tables got corrupted and that's why it wasn't successful.
I was able to wipe the tables as they only had session data in them so all
is well.
May 8 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Daniel Gwynne | last post by:
I am trying to read a mysql dump file that I was given from a mysql dump file into my mysql server, I am using the following command at the mysql command line and get the following error: mysql>...
1
by: Wayfarer | last post by:
I'm an ASP/M$ Access programmer who is leaving the Dark Side for PHP/MySQL. I'm used to adding, changing, deleting my Access database locally and then FTPing it up to my website. What are the...
4
by: wzhao6898 | last post by:
Hi there, I'm trying to figure out if it's going painless to upgrade our oooold mysql 3.23 to the latest MySQL 4 or 5. Any suggestions? Thanks in advance! David
1
by: Richard Huxton | last post by:
On Thursday 12 February 2004 20:25, Prashanthi Muthyala wrote: > Hi Richard Hi Prashanthi - nice to hear from you again. I've taken the liberty of cc-ing the general list on this, since there...
2
by: Dudu | last post by:
Dear Programmers I try to install mysql version 5.0 and I encountered with a problem when I tried to start the service. I got error 1067. I checked the log file and saw the following records...
5
by: linuxlover992000 | last post by:
I am a newbie in the world of MySQL. In fact I enabled it in my Linux box only because it is required to run WordPress (the blogging software). I was trying to plan ahead and figure out a way to...
7
by: Ivan Marsh | last post by:
Hey Folks, I'm having a heck of a time wrapping mind around AJAX. Anyone know of a simple, straight-forward example for pulling a simple query from mysql with PHP using AJAX? As I...
1
by: spatro | last post by:
Hi, I am trying to install DBD::mysql using the CPAN and I am facing the following error: cpan> install DBD::mysql CPAN: Storable loaded ok Going to read /root/.cpan/Metadata Warning:...
39
by: alex | last post by:
I've converted a latin1 database I have to utf8. The process has been: # mysqldump -u root -p --default-character-set=latin1 -c --insert-ignore --skip-set-charset mydb mydb.sql # iconv -f...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.