473,385 Members | 1,347 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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 2203

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

Similar topics

4
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
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
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
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
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
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
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
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
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.