• The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

ODBC can't access database

L

lukinhasb

Guest
Hello,

I'll try to expose my problem with as information as I can do... My problem is the following:

I can't access my database trough ODBC, but I can access it by clicking on
"Databases", with the same informations on both (user, password, etc).

Error: Unable to connect to the data source using the defined settings. Server has returned:
ODBCError HY000: [MySQL][ODBC 3.51 Driver]Access denied for user
'myusername'@'localhost'
(using password: YES)

It's clearly an login/password error, but I can access my database with the exact same datas in
"Database" option

What I've done:

1 - Log me in at plesk (https://windows1.absamhost.com.br:8443/login.php3) with my user
and password
2 - Went to "Databases"
3 - Add New Database
4 - Database name: "mydatabase", Database Server: "MySQL"
5 - Add New Database User
6 - Database Username: "myusername", New Password: "mypassword"

Ok, at this point I can access my database, edit it and stuff

Then

7 - ODBC Data Sources
9 - Add New ODBC DSN
10 - Connection Name: "mydatabase", Connection Description "empty", Driver:
"MySQL ODBC 3.51 Driver"
11 - Now it shows some options to configure the connection, wich is set as show bellow:

[DRIVER] MySQL ODBC Driver ---- MySQL ODBC 3.51 Driver
[Server] * The hostname of the MySQL server ---- localhost, because when I access the database it
shows like username: myusername@localhost
[Database] The default database---- mydatabase
[User] * The username used to connect to MySQL ---- myusername
[Password] * The password for the user account on server ---- mypassword
[Port] The TCP/IP port to use if server is not localhost ---- 3306
[Socket] Windows named pipe to connect to if server is localhost ---- empty
[Option] Options that specify how MyODBC should work.---- 0 (wich value should I put here?)

That's all I've done.

My objective: Access my database trough my computer. The database is hosted at absamhost.com.br, and
I think they've not managed to solve the problem, trough the support tickets I've sent
them

How do I do this? What's wrong?

PS: An interesting thing is that my user does not have "SUPER" privileges, it seems he can
only edit "mydatabase" database, I tried to execute an "delete trigger" command it
said I didn't have SUPER privileges to do this... Maybe there's some conection with my
probem? Like, ODBC is trying to connect as a root user, and not directly on "mydatabase"
database?

Thanks a lot!
 
Last edited by a moderator:
Back
Top