Kirti S. Bajwa wrote:

Hello List:

I have setup MySQL and it is working fine. I tested connection to MySQL.

Now I have gone one step futher and added a password for mysql, as follows:

shell> ./mysqladmin -u root password mysqlpw

Now I want to setup myc.cnf. Our SQL server is a standalone server (RH9,
Dual CPU, 1.5GB Memory, RAID1, etc.), so I copied the "my-large.cnf" to
"/etc/my.cnf". After looking into "my.cnf", I decided to leave it as it is
(no change). I do want to add the (1) name of the server and (2) password to
the my.cnf. Here I am struck for last couple of days.

For this, you want the .my.cnf file in your home directory. See <http://www.mysql.com/doc/en/Option_files.html> for details.



Finally, here is my question; I want to execute the command:


shell> mysql -h data -u mysql password=mysqlpw

Where (from above command), mysql server is "data" and password is
"mysqlpw". What lines do I need to enter in my.cnf for the above command to
work? I have tried everything I know! HELP!!

This should work without anything special in an option file, assuming that


* mysqld server is running on the machine named "data".

* your hostname lookup will properly resolve "data".

* user [EMAIL PROTECTED], where "client.machine" is the name of the computer on which you are running the mysql client, has permission to access the mysqld server on data.

If you could provide the exact error message you get when you try this, someone should be aable to diagnose the problem.

Finally, I should point out that putting the password on the command line is insecure. It would be better to use

shell> mysql -h data -u mysql -p

in which case you'll be prompted for the password.

KIrti

Michael



-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to