I'm Mac user and I've recently installed MySQL CLI with Homebrew :

brew install mysql-client

Most of time I use it for classic connection on default MySQL port :

mysql -h hostname -P 3306 -uuser -p

And it works great !

Now I need to use it to connect on specific port :

mysql -h hostname -P 44000 -uuser -p

And I get the following message :

ERROR 1045 (28000): Access denied for user 'root'@'ip' (using password: NO)

I've tried with passing password in clear or using a config file but I got the same message. It seems that password isn't send when a port other than default is used.

Anyone has already encountered this problem and know how to solve it please ?

  • Does your MySQL instance is reconfigured for to use this non-standard port? – Akina Jan 14 at 11:51
  • Yes the MySQL instance is configured for the non-standard port. I think the problem comes from my Mac because I can connect on this instance from another server. – Tim Jan 14 at 13:11
  • The very strange thing is that the error shows : "(using password: NO)" despite I enter a password. – Tim Jan 14 at 13:24
  • Is there a local .ini file in this client? check client parameters section in it... – Akina Jan 14 at 13:30
  • Can you add the version number of the client (and the server)? – Luuk Jan 14 at 14:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.