469,267 Members | 979 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,267 developers. It's quick & easy.

mysqldump produces an empty file

hi everyone!
i am having a problem with mysqldump.i am running this script from the
shell

root@linuxserver:/usr/local/mysql#bin/mysqldump u im_backup --opt
inventory /home/all/sqlbu/inv_'date +%F.sql

(user=imbackup
dbase name = inventory)

i don't 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 would
appreciate any response..tnx

May 9 '07 #1
7 5085
grace wrote:
hi everyone!
i am having a problem with mysqldump.i am running this script from the
shell

root@linuxserver:/usr/local/mysql#bin/mysqldump u im_backup --opt
inventory /home/all/sqlbu/inv_'date +%F.sql

(user=imbackup
dbase name = inventory)

i don't 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 would
appreciate any response..tnx
for one, got to make sure you have the login correct (is it imbackup or
im_backup)!!!

second, you'll 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 -- ha****@sbcdeglobalspam.net
To reply to me directly, delete "despam".
May 9 '07 #2

Ayon kay lark:
grace wrote:
hi everyone!
i am having a problem with mysqldump.i am running this script from the
shell

root@linuxserver:/usr/local/mysql#bin/mysqldump u im_backup --opt
inventory /home/all/sqlbu/inv_'date +%F.sql

(user=imbackup
dbase name = inventory)

i don't 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 would
appreciate any response..tnx

for one, got to make sure you have the login correct (is it imbackup or
im_backup)!!!

second, you'll 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 -- ha****@sbcdeglobalspam.net
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 did not 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
don't know how. my problem maybe simple but i am a new user of mysql
and linux, so i don't know how to assign scheduled task on linux).
Don't even know how to use crontab...

May 10 '07 #3

Ayon kay grace:
Ayon kay lark:
grace wrote:
hi everyone!
i am having a problem with mysqldump.i am running this script from the
shell
>
root@linuxserver:/usr/local/mysql#bin/mysqldump u im_backup --opt
inventory /home/all/sqlbu/inv_'date +%F.sql
>
(user=imbackup
dbase name = inventory)
>
i don't 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 would
appreciate any response..tnx
>
for one, got to make sure you have the login correct (is it imbackup or
im_backup)!!!

second, you'll 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 -- ha****@sbcdeglobalspam.net
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 did not 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
don't know how. my problem maybe simple but i am a new user of mysql
and linux, so i don't know how to assign scheduled task on linux).
Don't 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 ;-)

May 10 '07 #4
grace wrote:
Ayon kay grace:
>Ayon kay lark:
>>grace wrote:
hi everyone!
i am having a problem with mysqldump.i am running this script from the
shell

root@linuxserver:/usr/local/mysql#bin/mysqldump u im_backup --opt
inventory /home/all/sqlbu/inv_'date +%F.sql

(user=imbackup
dbase name = inventory)

i don't 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 would
appreciate any response..tnx

for one, got to make sure you have the login correct (is it imbackup or
im_backup)!!!

second, you'll 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 -- ha****@sbcdeglobalspam.net
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 did not 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
don't know how. my problem maybe simple but i am a new user of mysql
and linux, so i don't know how to assign scheduled task on linux).
Don't 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,
don't worry! for backup, there are many perl scripts you can freely
download. they'll do the job for you. you don't have to reinvent the
wheel. it's been already done for you.

crontab scheduling is not hard at all. again you'll find a tone of
material on this out there on the 'net.

if you have any more mysql questions, let us know and good luck.

--
lark -- ha****@sbcdeglobalspam.net
To reply to me directly, delete "despam".
May 10 '07 #5

Ayon kay lark:
grace wrote:
Ayon kay grace:
Ayon kay lark:
grace wrote:
hi everyone!
i am having a problem with mysqldump.i am running this script from the
shell

root@linuxserver:/usr/local/mysql#bin/mysqldump u im_backup --opt
inventory /home/all/sqlbu/inv_'date +%F.sql

(user=imbackup
dbase name = inventory)

i don't 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 would
appreciate any response..tnx

for one, got to make sure you have the login correct (is it imbackup or
im_backup)!!!

second, you'll 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 -- ha****@sbcdeglobalspam.net
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 did not 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
don't know how. my problem maybe simple but i am a new user of mysql
and linux, so i don't know how to assign scheduled task on linux).
Don't 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,
don't worry! for backup, there are many perl scripts you can freely
download. they'll do the job for you. you don't have to reinvent the
wheel. it's been already done for you.

crontab scheduling is not hard at all. again you'll find a tone of
material on this out there on the 'net.

if you have any more mysql questions, let us know and good luck.

--
lark -- ha****@sbcdeglobalspam.net
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..

May 11 '07 #6
grace wrote:
Ayon kay lark:
>grace wrote:
>>Ayon kay grace:
Ayon kay lark:
grace wrote:
>hi everyone!
>i am having a problem with mysqldump.i am running this script from the
>shell
>>
>root@linuxserver:/usr/local/mysql#bin/mysqldump u im_backup --opt
>inventory /home/all/sqlbu/inv_'date +%F.sql
>>
>(user=imbackup
>dbase name = inventory)
>>
>i don't 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 would
>appreciate any response..tnx
>>
for one, got to make sure you have the login correct (is it imbackup or
im_backup)!!!
>
second, you'll 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 -- ha****@sbcdeglobalspam.net
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 did not 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
don't know how. my problem maybe simple but i am a new user of mysql
and linux, so i don't know how to assign scheduled task on linux).
Don't 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,
don't worry! for backup, there are many perl scripts you can freely
download. they'll do the job for you. you don't have to reinvent the
wheel. it's been already done for you.

crontab scheduling is not hard at all. again you'll find a tone of
material on this out there on the 'net.

if you have any more mysql questions, let us know and good luck.

--
lark -- ha****@sbcdeglobalspam.net
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 don't call me sir! lark would do fine!

--
lark -- ha****@sbcdeglobalspam.net
To reply to me directly, delete "despam".
May 11 '07 #7

Ayon kay lark:
grace wrote:
Ayon kay lark:
grace wrote:
Ayon kay grace:
Ayon kay lark:
grace wrote:
hi everyone!
i am having a problem with mysqldump.i am running this script from the
shell
>
root@linuxserver:/usr/local/mysql#bin/mysqldump u im_backup --opt
inventory /home/all/sqlbu/inv_'date +%F.sql
>
(user=imbackup
dbase name = inventory)
>
i don't 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 would
appreciate any response..tnx
>
for one, got to make sure you have the login correct (is it imbackup or
im_backup)!!!

second, you'll 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 -- ha****@sbcdeglobalspam.net
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 did not 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
don't know how. my problem maybe simple but i am a new user of mysql
and linux, so i don't know how to assign scheduled task on linux).
Don't 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,
don't worry! for backup, there are many perl scripts you can freely
download. they'll do the job for you. you don't have to reinvent the
wheel. it's been already done for you.

crontab scheduling is not hard at all. again you'll find a tone of
material on this out there on the 'net.

if you have any more mysql questions, let us know and good luck.

--
lark -- ha****@sbcdeglobalspam.net
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 don't call me sir! lark would do fine!

--
lark -- ha****@sbcdeglobalspam.net
To reply to me directly, delete "despam".
umm... ok lark..have a good day ;-) godbless

May 12 '07 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Dan F | last post: by
reply views Thread by Thiko | last post: by
7 posts views Thread by Adam Smith | last post: by
reply views Thread by mcstayinskool | last post: by
1 post views Thread by Greg.Harabedian | last post: by
2 posts views Thread by Vadim | last post: by
5 posts views Thread by Richard | last post: by
6 posts views Thread by Antoni | last post: by
7 posts views Thread by damezumari | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.