• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

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