473,748 Members | 2,672 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 3699
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
14510
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
1455
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
2137
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
3361
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
2808
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
15404
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
3772
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
4348
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
5865
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
8995
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9561
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
9381
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...
0
9254
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8252
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
6799
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
6078
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
4608
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2791
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.