Mike Tuller wrote:

I have a shell script that is supposed to connect to a remote server running
MySql 3.23.53. It comes up with an error "ERROR 1045: Access denied for
user: '[EMAIL PROTECTED]' (Using password: YES)"

The script looks like this:
/usr/local/mysql/bin/mysql  --user=$username --password=$password
cetechnology -e \

That makes sense to me, I don't have permissions set correctly right for the
$username (hardware). I know the password is set correctly.

Then why am I able to connect to the server in the terminal with:
/usr/local/mysql/bin/mysql -h 204.xxx.xxx.xxx -u hardware -p cetechnology
And then enter my password.

What is the difference?

I'm not certain about this one (I'm not totally confident with MySQL's permission system myself). But it seems to me that assuming that the IP that you x'd out in your second example _is_ the IP of the local server in your first example then MySQL is going to treat them incoming connections from two different locations.


One is going to be a connection from [EMAIL PROTECTED] the other is a connection from [EMAIL PROTECTED] - I think there's a good chance that MySQL will treat these as entirely different hosts to be GRANTed on despite the fact that they are actually the same physical machine.

Therefore - if connections to 204.xxx.xxx.xxx work and connections to localhost don't, you need to GRANT the right permissions to [EMAIL PROTECTED]

Have a look over the relevent section of the handbook for how to use GRANT

HTH

Andrew


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



Reply via email to