473,499 Members | 1,562 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

mysqldump w/o password

Hi All

I have to run this to dump the database

mysqldump -u root -pPASS --opt database > database.tmp

Is there anyway I can hide the PASS is a file ? I was trying to put it in
/root/.my.cnf as this

[client]
password = PASS

That seems to be not working. I am not sure if mysqldump even reads that file.
The only option worked for me is putting the password in a file /root/.pass and
chmod it to 000 and then run this

mysqldump -u root -p`cat /root/.pass` --opt database > database.tmp

However I don't like this option because it tells you where the password is
residing. I need to put this in cron so I don't like the option of showing the
filename

Thanks

--
Asif Iqbal
http://pgpkeys.mit.edu:11371/pks/loo...rch=0x8B686E08
There's no place like 127.0.0.1
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/my***********...ie.nctu.edu.tw

Jul 19 '05 #1
0 2204

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

Similar topics

4
2597
by: Mangina | last post by:
Hello all. Can anyone see why this snippet of code isnt dumping the databases using mysqldump ? All the credentials are correct (changed for the purpose of this post). $host = "localhost";...
0
1568
by: Kalle Saarinen | last post by:
Hello I'm trying to make mysqldump in a shell script but I can't deliver password to sql server. I have command in the script: mysqldump databasename -u username -p password >...
0
2839
by: Jan Schwingenschlögl | last post by:
I have command in the script: mysqldump databasename -u username -p password > /to/a/directory/dump.sql When i run the script it asks for a password and takes the password given in the script...
0
992
by: Asif Iqbal | last post by:
Hi All I have to run this to dump the database mysqldump -u root -pPASS --opt database > database.tmp Is there anyway I can hide the PASS is a file ? I was trying to put it in /root/.my.cnf...
4
15568
by: 21novembre | last post by:
Hi all, I got a quite strange problem when I tried to setup a database backup shell. I put it this way: "bin/mysqldump --opt --user=xxx --password=xxx DB > DB.bak" However, error 1045 came to...
2
36733
by: Vadim | last post by:
Hi! I succesfully exported my locally stored db using the following syntax: mysqldump -u root --password=111 finance > sqlbk.dump Now I created another empty db finance2 (on the same Mysql...
7
5384
by: grace | last post by:
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...
7
4702
by: damezumari | last post by:
I use Windows XP and Apache. I am trying to backup a database on my local computer with the following php code: $dbname = 'ol'; $dbhost = 'localhost'; $dbuser = 'root'; $dbpass =...
2
3073
by: dev2746 | last post by:
Hi :-)..............., I am having a problem with mysqldump with mysql 5.0.27 installed on a win xp pro sp2. I just want to do a simple backup of all my databases. I have xp installed in the D...
0
7012
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7225
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...
1
6901
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
7392
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
5479
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,...
1
4920
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...
0
4605
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...
0
3105
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...
1
667
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.