473,563 Members | 2,762 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 2215

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

Similar topics

4
2602
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"; $user = "root"; $pass = "password"; $database = "database"; $dbname = array ("1","2","3","4","5");
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 > /to/a/directory/dump.sql When i run the script it asks for a password and takes the password given in
0
2846
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 for a table name. How can I give the password in the script??? Try it like this:
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 as this
4
15573
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 me to say "Access denied for user 'xxx'@'localhost' (using password: YES) when trying to connect". None the less, I'm absolutely full of confidence...
2
36739
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 server) and try to restore their my finance db: mysqldump -u root --password=111 finance2 < sqlbk.dump
7
5394
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 +%F.sql (user=imbackup dbase name = inventory)
7
4710
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 = 'password'; $backupFile = $dbname .'-' .date("Y-m-d-H-i-s") . '.sql';
2
3084
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 drive and the mysql datafiles in a folder "MySQL Datafiles" in the F drive. This is my problem: I go to this location "D:\Program...
0
7664
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...
0
7885
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. ...
1
7638
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7948
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...
0
6250
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...
1
5484
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...
0
5213
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...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2082
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.