| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Michael Stassen | Date: | July 29 2005 7:11am |
| Subject: | Re: mysql command line execution | ||
| View as plain text | |||
Jeff Richards wrote: > Hi, > > Is there a secure way of running mysql commands against the db from the > command line, or in some kind of secure batch mode, without making the > password totally visible? We need to procedurize things like "flush > tables with read lock", "unlock tables" etc. Is making the password > visible on the command line the only way? > > Thanks, > > Jeff No, you can put the mysql user and password in an option file (usually .my.cnf). Of course, you'll make this file readable only by the user running the job. You'll need at least [client] user=mysql_username password="my_password" in the file. Actually, you can leave out the "user=..." line if the mysql user and the unix user are the same. For the details, see the description of option files in the manual <http://dev.mysql.com/doc/mysql/en/option-files.html>. Michael
| Thread | ||
|---|---|---|
| • mysql command line execution | Jeff Richards | 29 Jul |
| • Re: mysql command line execution | Bruce Dembecki | 29 Jul |
| • Re: mysql command line execution | Michael Stassen | 29 Jul |
| • Re: mysql command line execution | Ehrwin Mina | 29 Jul |
| • Re: mysql command line execution | Michael Stassen | 29 Jul |
| • Re: mysql command line execution | Nuno Pereira | 29 Jul |
| • Re: mysql command line execution | Michael Stassen | 29 Jul |
| • Re: mysql command line execution | Nuno Pereira | 29 Jul |
| • Re: mysql command line execution | Jason Pyeron | 29 Jul |
| • Re: mysql command line execution | Nuno Pereira | 1 Aug |
| • Re: mysql command line execution | Joerg Bruehe | 29 Jul |
| • Re: mysql command line execution | Ehrwin Mina | 1 Aug |
| • Re: mysql command line execution | Eugene Kosov | 1 Aug |
| • RE: mysql command line execution | Edwin Cruz | 1 Aug |
| • Re: mysql command line execution | Nuno Pereira | 1 Aug |
| • Re: mysql command line execution | Nuno Pereira | 2 Aug |
| • Re: mysql command line execution | Nuno Pereira | 3 Aug |
