Forums

Failing to connect to the mysql database

Hello, I'm failing to connect to the local database palagrassi$default. I've set up a password, but i'm constantly rejected by the server.

mysql --user=palagrassi --host=mysql.server --password=[mypassword] palagrassi$default Error message: Access denied for user 'palagrassi'@'%' to database 'palagrassi'

Could you tell me where is my connection parameters issue?

Thanks!

Hi palagrassi,

You need to escape the $ in the database name. Try:

mysql --user=palagrassi --host=mysql.server --password=[mypassword] palagrassi\$default

Note the \ in the database name.

Ok, I've found the issue. This was the same thing with the connection string. The thing is that one must enter the connection string including "\".

mysql --user=palagrassi --host=mysql.server --password=[mypassword] "palagrassi\$default"

SNAP! :-)