ODBC connection access denied MySQL - mysql

I am able to connect to the remote mysql database that is on a different domain that are in the same network, from the sql workbench(using servername.domain.com), but am unable to set up an ODBC connection using the same connection parameters.
I tried to connect using TCP/IP could not succeed. I get "Access denied for user" error, as its trying to connect using the current domain as the host. But the database server is on a different domain.How do we change the domain ?
I was not sure how to use named pipes, any help there would be appreciated.Thank you!

Related

Tableau error connecting to local MySQL db

Windows Server 2008
Tableau Desktop 7.0
Local MySQL database using Xampp
When attempting to connect to a localhost MySQL database server using the native MySQL data connection in Tableau Desktop, I'm getting the following error:
"The connection to the data source might have been lost.
Communication with the Tableau Protocol Server process was lost.
Unable to connect to the server "localhost". Check that the server is running and that you have access privileges to the requested database.
Unable to connect to the server. Check that the server is running and that you have access privileges to the requested database."
When using "Other Databases (ODBC)" in Tableau, I am able to connect and return data. However, I would prefer to use the MySQL connection to avoid the limitations of the Other Databases connection.
I created a specific username in phpmyadmin as well as tried using the root username and password and the same error was returned. I created a user DSN in odbcad32.exe and attempted using multiple versions of the MySQL ODBC driver (3.5, 5.2.7, 5.3.4).
Does anyone have any ideas of what might be causing the error? Really appreciate any help.
A bit late in replying but....
MySQL user connections are based on a combination of username,password AND the host you are connecting from.
If you are connecting to MySQL on the same host as Tableau server, then the connecting host could be seen as '127.0.0.1', 'localhost', '::1' or even a hostname if MySQL is configured to resolve those.
The simple way to test would be to set the host field to '%' for the user you are trying to connect as. I would not recommend this for your root user entry or other accounts with significant privileges.

Unable to authenticate to mysql via vb.net

I have set up a MySQL server on Debian Linux and need to access a database on this server via vb.net. I found some help on Code Project to download the connector.net library and build a class to access the MySQL database. However when I try to connect I get the authentication error below when attempting to establish a connection with the mysql server:
Authentication to host '192.168.68.47' for user 'root' using method 'mysql_native_password' failed with message: Access denied for user 'root'#'' (using password: YES)"} System.Exception
It seems that the library is appending the Windows workstation and domain to the user name and I am getting error. I tried using the root user with "#IPaddress" of the workstation, but it simply appended the workstation name and domain to this user. I also tried with another user besides root.
This is perfectly logic, because on your mysql server you need to Grant access to your host so it will be allowed to connect to, you can do it by following instructions in the following
Link
Also in the mysql configuration file, in your case : /etc/mysql/my.cnf you need to delete the line
bind-address = 127.0.0.1
This line will restrict all access from remote hosts, deleting it will allow access from remote hose which is what you want to do.
Hope this helps.

Connection Failed: HY000 MySQL ODBC driver access denied

I have taken sometime to lookup queries that are similar to my query but I could not find any useful solution.
I am trying to create an ODBC connection to MySQL database on my Web host Linux server. they have given me the right login details to use. In creating the connection from my local machine running Windows 7, I encountered the following error:
Connection Failed: [HY000] [MySQL][ODBC] 3.51 Driver]Access denied for user"MyDatabasename"#host-"MYLOCALMACHINE'S PUBLIC IP.net" (Using password: YES)
I am not sure why I am denied access on my local machine instead of the Web host server where am wishing to connect to and I don't seem to figure out what is wrong.The host should have been the company's host name not my local machine host Any hint or help will be appreciated. Thanks.

How to Connect Excel to ONLINE Mysql Database in my Domain using ODBC?

I've been trying to connect Excel to online mysql database.
Im using 5.1 DSN ODBC, gone through the process but when im establishing the connection of mysql and excel an error occured.
Connection Failed: [HY000] [MYSQL][ODBC 5.1 Driver]Access denied for user 'icafeown'#'118.252.49.9'(userpassword: YES)
I've been in the same questions like this but i cant establish the correct connection.
im using Cpanel for the domain and i already used Remote MySQL.
and the Database: Dropdown are empty.
Thank you.
Access denied means that you've successfully established a TCP connection to the MySQL server, but don't have appropriate permissions within MySQL to actually "log in" to the server.
Usually this is because of a mis-match on the 'host' portion of the MySQL user account. e.g. You may have created a someone#example.com account in MySQL, but your client's IP address cannot be reverse-lookuped to confirm that it is "example.com". MySQL only sees the IP you connect from, not the hostname. If your 118.252.49.9 can't be resolved to be 'example.com', you won't get it.
Same goes for connections on the same machine. You may have your someone#example.com MySQL account, but MySQL will see a connection come in from 127.0.0.1/localhost, which is NOT "example.com".

How to find the Server Name of MySQL

Where can I find the name of MySQL which I'll use at the connection string to connect to the database from c#?
If you're connecting to a db on the same server, it should be "localhost".
If you are connecting to a remote server, then it should be the FQDN of the remote server (or the IP address) - for example, "dbhost.lan.company.com".
"Unhandled Exception: MySql.Data.MySqlClient.MySqlException: Access denied for user 'root'#'sfn-inkubator-70-61.hib.no' (using password: YES)" error means that you have setup connection address correctly. Client connects to server, but server rejects username and password combination.
So you need to check your server setup, create some user with known password and so on......
It's very possible your host blocks external access to your mysql db, quite a few do. This would explain why you can connect via myadmin.