mysqldump produces an empty file
8 Message(s) by 2 Author(s) originally posted in mysql database
| From: grace |
Date: Wednesday, May 09, 2007
|
hi everyone!
I am having a problem with mysqldump.i am running this script from the
shell
root @xxxxxxxxxxx:/usr/local/mysql#bin/mysqldump u im_backup --opt
inventory > /home/all/sqlbu/inv_'date +%F.sql
(user=imbackup
dbase name = inventory)
i do not know what am I missing or what's the problem with this line
since it generates only an empty file...
I created the user im_backup granting all privileges. There was no
error messages too.. what's the problem w/ this? I really'd
appreciate any response..tnx
| From: lark |
Date: Wednesday, May 09, 2007
|
wrote in message:
hi everyone!
I am having a problem with mysqldump.i am running this script from the
shell
root@xxxxxxxxxxx:/usr/local/mysql#bin/mysqldump u im_backup --opt
inventory > /home/all/sqlbu/inv_'date +%F.sql
(user=imbackup
dbase name = inventory)
i do not know what am I missing or what's the problem with this line
since it generates only an empty file...
I created the user im_backup granting all privileges. There was no
error messages too.. what's the problem w/ this? I really'd
appreciate any response..tnx
for one, got to make sure you've the login correct (is it imbackup or
im_backup)!!!
second, you will also need to
include the "-p"
option to be prompted for
password . so try this:
mysqldump -p -u username --opt inventory > file.sql
if you're doing this in your localhost (the
machine that the mysql
server is installed on) then you need to make sure that the user has
localhost as one of its allowed hosts. it's simple, just check the mysql
user
table and look for all entries for that specefic account (imbackup
or whatever the name of it is).
--
lark -- hamzee@xxxxxxxxxxx
To
reply to me directly,
delete "despam".
| From: grace |
Date: Thursday, May 10, 2007
|
Ayon kay lark:
wrote in message:
> hi everyone!
> I am having a problem with mysqldump.i am running this script from the
> shell
>
> root@xxxxxxxxxxx:/usr/local/mysql#bin/mysqldump u im_backup --opt
> inventory > /home/all/sqlbu/inv_'date +%F.sql
>
> (user=imbackup
> dbase name = inventory)
>
> i do not know what am I missing or what's the problem with this line
> since it generates only an empty file...
> I created the user im_backup granting all privileges. There was no
> error messages too.. what's the problem w/ this? I really'd
> appreciate any response..tnx
>
for one, got to make sure you've the login correct (is it imbackup or
im_backup)!!!
second, you will also need to include the "-p" option to be prompted for
password. so try this:
mysqldump -p -u username --opt inventory > file.sql
if you're doing this in your localhost (the machine that the mysql
server is installed on) then you need to make sure that the user has
localhost as one of its allowed hosts. it's simple, just check the mysql
user table and look for all entries for that specefic account (imbackup
or whatever the name of it is).
--
lark -- hamzee@xxxxxxxxxxx
To reply to me directly, delete "despam".
hello sir Lark
im sorry username should be = im_backup, but anyway, I did followed
your script w/ -p (before -u) and I used root instead of im_backup
(since i didn't assigned any password to im_backup user)..my problem
now is how am I going to inlude password on the script if such script
would be saved as *.sh file. another problem is that I am planning to
schedule backing-up my dbase using crontab with this script but I
do not know how. my problem maybe simple but I am a new user of mysql
and linux, so i do not know how to assign scheduled task on linux).
Do not even know how to use crontab...
| From: grace |
Date: Thursday, May 10, 2007
|
Ayon kay grace:
Ayon kay lark:
wrote in message:
> > hi everyone!
> > I am having a problem with mysqldump.i am running this script from the
> > shell
> >
> > root@xxxxxxxxxxx:/usr/local/mysql#bin/mysqldump u im_backup --opt
> > inventory > /home/all/sqlbu/inv_'date +%F.sql
> >
> > (user=imbackup
> > dbase name = inventory)
> >
> > i do not know what am I missing or what's the problem with this line
> > since it generates only an empty file...
> > I created the user im_backup granting all privileges. There was no
> > error messages too.. what's the problem w/ this? I really'd
> > appreciate any response..tnx
> >
>
> for one, got to make sure you've the login correct (is it imbackup or
> im_backup)!!!
>
> second, you will also need to include the "-p" option to be prompted for
> password. so try this:
>
> mysqldump -p -u username --opt inventory > file.sql
>
> if you're doing this in your localhost (the machine that the mysql
> server is installed on) then you need to make sure that the user has
> localhost as one of its allowed hosts. it's simple, just check the mysql
> user table and look for all entries for that specefic account (imbackup
> or whatever the name of it is).
>
> --
> lark -- hamzee@xxxxxxxxxxx
> To reply to me directly, delete "despam".
hello sir Lark
im sorry username should be = im_backup, but anyway, I did followed
your script w/ -p (before -u) and I used root instead of im_backup
(since i didn't assigned any password to im_backup user)..my problem
now is how am I going to inlude password on the script if such script
would be saved as *.sh file. another problem is that I am planning to
schedule backing-up my dbase using crontab with this script but I
do not know how. my problem maybe simple but I am a new user of mysql
and linux, so i do not know how to assign scheduled task on linux).
Do not even know how to use crontab...
oopps sorry, I forgot to send my million tnx for helping me solve my
first problem..tnx and tnx ;-)
| From: lark |
Date: Thursday, May 10, 2007
|
wrote in message:
Ayon kay grace:
Ayon kay lark:
wrote in message:
hi everyone!
I am having a problem with mysqldump.i am running this script from the
shell
root@xxxxxxxxxxx:/usr/local/mysql#bin/mysqldump u im_backup --opt
inventory > /home/all/sqlbu/inv_'date +%F.sql
(user=imbackup
dbase name = inventory)
i do not know what am I missing or what's the problem with this line
since it generates only an empty file...
I created the user im_backup granting all privileges. There was no
error messages too.. what's the problem w/ this? I really'd
appreciate any response..tnx
for one, got to make sure you've the login correct (is it imbackup or
im_backup)!!!
second, you will also need to include the "-p" option to be prompted for
password. so try this:
mysqldump -p -u username --opt inventory > file.sql
if you're doing this in your localhost (the machine that the mysql
server is installed on) then you need to make sure that the user has
localhost as one of its allowed hosts. it's simple, just check the mysql
user table and look for all entries for that specefic account (imbackup
or whatever the name of it is).
--
lark -- hamzee@xxxxxxxxxxx
To reply to me directly, delete "despam".
hello sir Lark
im sorry username should be = im_backup, but anyway, I did followed
your script w/ -p (before -u) and I used root instead of im_backup
(since i didn't assigned any password to im_backup user)..my problem
now is how am I going to inlude password on the script if such script
'd be saved as *.sh file. another problem is that I am planning to
schedule backing-up my dbase using crontab with this script but I
do not know how. my problem maybe simple but I am a new user of mysql
and linux, so i do not know how to assign scheduled task on linux).
Do not even know how to use crontab...
oopps sorry, I forgot to send my million tnx for helping me solve my
first problem..tnx and tnx ;-)
grace,
do not worry! for backup, there are many perl scripts you can freely
download. they will do the
job for you. you do not have to reinvent the
wheel. it's been already done for you.
crontab
scheduling isn't hard at all. again you will find a
tone of
material on this out there on the 'net.
if you've any more mysql questions, let us know and good luck.
--
lark -- hamzee@xxxxxxxxxxx
To reply to me directly, delete "despam".
| From: grace |
Date: Friday, May 11, 2007
|
Ayon kay lark:
wrote in message:
> Ayon kay grace:
Ayon kay lark:
wrote in message:
hi everyone!
I am having a problem with mysqldump.i am running this script from the
shell
root@xxxxxxxxxxx:/usr/local/mysql#bin/mysqldump u im_backup --opt
inventory > /home/all/sqlbu/inv_'date +%F.sql
(user=imbackup
dbase name = inventory)
i do not know what am I missing or what's the problem with this line
since it generates only an empty file...
I created the user im_backup granting all privileges. There was no
error messages too.. what's the problem w/ this? I really'd
appreciate any response..tnx
> for one, got to make sure you've the login correct (is it imbackup or
> im_backup)!!!
>
> second, you will also need to include the "-p" option to be prompted for
> password. so try this:
>
> mysqldump -p -u username --opt inventory > file.sql
>
> if you're doing this in your localhost (the machine that the mysql
> server is installed on) then you need to make sure that the user has
> localhost as one of its allowed hosts. it's simple, just check the mysql
> user table and look for all entries for that specefic account (imbackup
> or whatever the name of it is).
>
> --
> lark -- hamzee@xxxxxxxxxxx
> To reply to me directly, delete "despam".
hello sir Lark
im sorry username should be = im_backup, but anyway, I did followed
your script w/ -p (before -u) and I used root instead of im_backup
(since i didn't assigned any password to im_backup user)..my problem
now is how am I going to inlude password on the script if such script
would be saved as *.sh file. another problem is that I am planning to
schedule backing-up my dbase using crontab with this script but I
do not know how. my problem maybe simple but I am a new user of mysql
and linux, so i do not know how to assign scheduled task on linux).
Do not even know how to use crontab...
>
> oopps sorry, I forgot to send my million tnx for helping me solve my
> first problem..tnx and tnx ;-)
>
grace,
do not worry! for backup, there are many perl scripts you can freely
download. they will do the job for you. you do not have to reinvent the
wheel. it's been already done for you.
crontab scheduling isn't hard at all. again you will find a tone of
material on this out there on the 'net.
if you've any more mysql questions, let us know and good luck.
--
lark -- hamzee@xxxxxxxxxxx
To reply to me directly, delete "despam".
Sir Lark
I have tried using crontabs after doing lots of reading
yesterday...and now it works ok..;-)
tnx so mch and godbless..
| From: lark |
Date: Friday, May 11, 2007
|
wrote in message:
Ayon kay lark:
wrote in message:
Ayon kay grace:
Ayon kay lark:
wrote in message:
hi everyone!
I am having a problem with mysqldump.i am running this script from the
shell
root@xxxxxxxxxxx:/usr/local/mysql#bin/mysqldump u im_backup --opt
inventory > /home/all/sqlbu/inv_'date +%F.sql
(user=imbackup
dbase name = inventory)
i do not know what am I missing or what's the problem with this line
since it generates only an empty file...
I created the user im_backup granting all privileges. There was no
error messages too.. what's the problem w/ this? I really'd
appreciate any response..tnx
for one, got to make sure you've the login correct (is it imbackup or
im_backup)!!!
second, you will also need to include the "-p" option to be prompted for
password. so try this:
mysqldump -p -u username --opt inventory > file.sql
if you're doing this in your localhost (the machine that the mysql
server is installed on) then you need to make sure that the user has
localhost as one of its allowed hosts. it's simple, just check the mysql
user table and look for all entries for that specefic account (imbackup
or whatever the name of it is).
--
lark -- hamzee@xxxxxxxxxxx
To reply to me directly, delete "despam".
hello sir Lark
im sorry username should be = im_backup, but anyway, I did followed
your script w/ -p (before -u) and I used root instead of im_backup
(since i didn't assigned any password to im_backup user)..my problem
now is how am I going to inlude password on the script if such script
'd be saved as *.sh file. another problem is that I am planning to
schedule backing-up my dbase using crontab with this script but I
do not know how. my problem maybe simple but I am a new user of mysql
and linux, so i do not know how to assign scheduled task on linux).
Do not even know how to use crontab...
oopps sorry, I forgot to send my million tnx for helping me solve my
first problem..tnx and tnx ;-)
grace,
do not worry! for backup, there are many perl scripts you can freely
download. they will do the job for you. you do not have to reinvent the
wheel. it's been already done for you.
crontab scheduling isn't hard at all. again you will find a tone of
material on this out there on the 'net.
if you've any more mysql questions, let us know and good luck.
--
lark -- hamzee@xxxxxxxxxxx
To reply to me directly, delete "despam".
Sir Lark
I have tried using crontabs after doing lots of reading
yesterday...and now it works ok..;-)
tnx so mch and godbless..
grace,
I work for a living, so please do not call me sir! lark'd do fine!
--
lark -- hamzee@xxxxxxxxxxx
To reply to me directly, delete "despam".
| From: grace |
Date: Friday, May 11, 2007
|
Ayon kay lark:
wrote in message:
> Ayon kay lark:
wrote in message:
> Ayon kay grace:
Ayon kay lark:
wrote in message:
hi everyone!
I am having a problem with mysqldump.i am running this script from the
shell
root@xxxxxxxxxxx:/usr/local/mysql#bin/mysqldump u im_backup --opt
inventory > /home/all/sqlbu/inv_'date +%F.sql
(user=imbackup
dbase name = inventory)
i do not know what am I missing or what's the problem with this line
since it generates only an empty file...
I created the user im_backup granting all privileges. There was no
error messages too.. what's the problem w/ this? I really'd
appreciate any response..tnx
> for one, got to make sure you've the login correct (is it imbackup or
> im_backup)!!!
>
> second, you will also need to include the "-p" option to be prompted for
> password. so try this:
>
> mysqldump -p -u username --opt inventory > file.sql
>
> if you're doing this in your localhost (the machine that the mysql
> server is installed on) then you need to make sure that the user has
> localhost as one of its allowed hosts. it's simple, just check the mysql
> user table and look for all entries for that specefic account (imbackup
> or whatever the name of it is).
>
> --
> lark -- hamzee@xxxxxxxxxxx
> To reply to me directly, delete "despam".
hello sir Lark
im sorry username should be = im_backup, but anyway, I did followed
your script w/ -p (before -u) and I used root instead of im_backup
(since i didn't assigned any password to im_backup user)..my problem
now is how am I going to inlude password on the script if such script
would be saved as *.sh file. another problem is that I am planning to
schedule backing-up my dbase using crontab with this script but I
do not know how. my problem maybe simple but I am a new user of mysql
and linux, so i do not know how to assign scheduled task on linux).
Do not even know how to use crontab...
> oopps sorry, I forgot to send my million tnx for helping me solve my
> first problem..tnx and tnx ;-)
>
grace,
do not worry! for backup, there are many perl scripts you can freely
download. they will do the job for you. you do not have to reinvent the
wheel. it's been already done for you.
crontab scheduling isn't hard at all. again you will find a tone of
material on this out there on the 'net.
if you've any more mysql questions, let us know and good luck.
--
lark -- hamzee@xxxxxxxxxxx
To reply to me directly, delete "despam".
>
> Sir Lark
> I have tried using crontabs after doing lots of reading
> yesterday...and now it works ok..;-)
> tnx so mch and godbless..
>
grace,
I work for a living, so please do not call me sir! lark'd do fine!
--
lark -- hamzee@xxxxxxxxxxx
To reply to me directly, delete "despam".
umm... ok lark..have a good day ;-) godbless
Next Message: JOINS and/or INTERSECTS
Blogs related to mysqldump produces an empty file
The Ultimate Linux Command List
When an event occurs, acpi_listen will print it on stdout. acpid - Advanced Configuration and Power Interface event daemon; activation-client -; addcr - is a command-line utility that converts a unix-style text
file to a DOS-style text
...
PHP: system - Manual
Execute
mysqldump command. // It will
produce a
file named $db-$year$month$day-$hour$min.gz // under $DOCUMENT_ROOT/$backupdir system(sprintf( '
mysqldump --opt -h %s -u %s -p%s %s | gzip > %s/%s/%s-%s%s%s-%s%s.gz',
...
Dumping MySQL information schema
Run this script inside a
empty directory, and it will create for each table one
file .
mysql containing the table DDL, and a .txt containing the data. At the same time, it will also compose a load_information_schema.
mysql, containing all
...
Chapter 4. Using MySQL Programs
port=3306 socket=/tmp/
mysql.sock key_buffer_size=16M max_allowed_packet=8M [
mysqldump] quick. The preceding option
file uses var_name = value syntax for the lines that set the key_buffer_size and max_allowed_packet variables.
...
MYSQL数据库操作命令——原文
Enabling NO_AUTO_VALUE_ON_ZERO before reloading the dump
file solves this problem.
mysqldump now automatically includes in its output a statement that enables NO_AUTO_VALUE_ON_ZERO , to avoid this problem. NO_BACKSLASH_ESCAPES
...
MySQL 5.1.14 Beta has been released
A change in the interfaces for the INFORMATION_SCHEMA.
FILES table has made the table accessible to storage engines other than NDB. (Bug#23013: http://bugs.
mysql.com/23013) *
mysqldump --single-transaction now uses START TRANSACTION
...