473,890 Members | 5,862 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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=@@CH ARACTER_SET_CLI ENT */;
/*!40101 SET @OLD_CHARACTER_ SET_RESULTS=@@C HARACTER_SET_RE SULTS */;
/*!40101 SET @OLD_COLLATION_ CONNECTION=@@CO LLATION_CONNECT ION */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_UNIQUE_CHE CKS=@@UNIQUE_CH ECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KE Y_CHECKS=@@FORE IGN_KEY_CHECKS,
FOREIGN_KEY_CHE CKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@ @SQL_MODE, SQL_MODE='NO_AU TO_VALUE_ON_ZER O' */;
/*!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 3706
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=mybackupus er --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\MyS QL Server 4.1\bin\mysqldu mp" -u
anyuser -p"password" anydatabase >"C:\Document s and
Settings\Admini strator\My
Documents\mysql dump\"%DATE_DAY %_%DATE_TIME%_a nydatabase.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
'69c4a4d359c7dd 6b';
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
'69c4a4d359c7dd 6b';
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
14517
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> items < c:\bookings\items.mtsql ERROR: Unknown command '\b'. ERROR: Unknown command '\i'. Does anyone know what this means?
1
1462
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 ways I can make changes to an online MySQL database and how may I find out more about them? TIA Neill
4
2146
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
3372
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 may be others who can help here. > I am trying to migrate the database and its tables from mysql in my > windows machine to postgresql in my new red hat linux . I was following > your links which has converstions from msaccess,mysql to postgresql...
2
2815
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 (which doesn't tell anything to me): 060527 12:46:54 InnoDB: Database was not shut down normally! InnoDB: Starting crash recovery. InnoDB: Reading tablespace information from the .ibd files...
5
15417
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 backup (and restore) a database, should my Linux machine ever goes belly up. I disovered that the databases are stored in subdirectories under /var/lib/mysql. My questions are basically three: (1) Why /var/lib? Why not some /home/mysql or...
7
3776
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 understand it I need a PHP script that pulls the query and dumps the data into XML format, that is called by triggering a javascript event that reads that file with XMLhttprequest.
1
4354
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: Found only 0 objects in /root/.cpan/Metadata CPAN: LWP::UserAgent loaded ok
39
5896
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 ISO-8859-1 -t UTF-8 mydb.sql mydb_utf8.sql mysqlCREATE DATABASE mydb_utf8 CHARACTER SET utf8 COLLATE utf8_general_ci;
0
11234
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10827
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10924
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9637
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8017
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7170
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6049
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4681
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3281
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.