mySQL command line works but ODBC and workbench do not - mysql

I am trying to test a connection to a mySQL database running on a remote linux server. I am running Windows 7 and have mySQL installed on my machine as well as the 32-bit ODBC driver. I can connect from the DOS command prompt with no problems. But I cannot connect using mySQL workbench or with ODBC (from MS Access).
In MySQL workbench my error is:
Your connection attempt failed for user 'username' from your host to server at 'x.x.x.x:x': Unknown MySQL server host 'x.x.x.x' (0)
In MS Acess (ODBC driver) my error is:
Connection faile:[HY000][MySQL][ODBC 5.2(w) Driver]Can't connect to MySQL server on 'x.x.x.x' (10061)
I've searched stackoverflow extensively and I found lots of people who can't get ANY connection to work. But I know I can log in from my computer. Could it be something other than ports?

Please make sure you are using correct ip address in MySQL workbench to connect to your mysql database

Related

Can't connect mysql workbench to mysql even though I can connect normally through the terminal

I recently installed mysql and mysql workbench on my manjaro machine. As for mysql itself, it works perfectly. I can start the service, connect using terminal and do my usual work without any trouble.
The problem is that mysql workbench can't, for the life of me, connect to mysql. Always returning the same your connection attempt failed for user 'root' to the mysql server at 127.0.0.1:3306: SSL connection error: SSL is required but the server doesn't support it error.
Even when I try the Rescan servers option on mysql workbench it returns No servers were found.

[MySQL][ODBC 5.3(a) Driver]Can't connect to MySQL server

I have difficulty connecting to MySQL server from Tableau Server.
The error message is:
[MySQL][ODBC 5.3(a) Driver]
Can't connect to MySQL server on XYZ.
Unable to connect to the MySQL server "xyz".
Check that the server is running and that you have access privileges to the requested database
I have installed MySQL ODBC 5.3 Driver from tarball distribution in Ubuntu OS, and whitelisted the IP address of Tableau server in MySQL server.
What could be the possible causes for this? And is there any way that I check the ODBC connector was properly installed?
Any suggestion/comments are much appreciated!
Reasons, you could not connect could be different. But the error you've get asks you to check if server is running. It means, it could not find server.
The reasons, it could not find server, could be:
Server is down (Check its status by systemctl status mysql)
Server is not listening on some port your app connects to
Server is behind firewall (sudo ufw allow mysql command execution required to solve it in this case)
Your user does not have permissions to access that database, as it states in the error

ERROR 2027 (HY000): Malformed packet - during login

C:\Program Files\MySQL\MySQL Server 5.7\bin>mysql -u root -p
Enter password:
ERROR 2027 (HY000): Malformed packet
I have 2 MySQL DBs version on my server 4.0 and 5.7. My apps can connect to both MySQL DBs without problem but when I try to login to the MySQL Command-Line Tool it is showing error as shown below. I also noticed even when I stopped the MySQL 5.7 service it is showing the same error but if I stopped the MYSQL4.0 service, it is showing:
ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10061)
Based on the some of the replies from similar topics, the malformed packet is because of the old password hashed issue but what are the things I need to do to change the password? Or my issue is not related with password?
FYI, I am using Windows Server 2012 R2. Mysql 5.7.21 and Mysql 4.0.17
It's compatibility issue between MySQL 5.7 client and MySQL 4.0 server.
My apps can connect to both MySQL DBs without problem but when I try to login to the MySQL Command-Line Tool it is showing error as shown below.
The reason may be simple, apps may be using diffrent version of Mysql connector API, e.g. App connect with v5.7 may be using 5.7 compatible liberary.
When you connect to MySQL 4.0, use MySQL 4.0 client and similar for MySql 5.7.
When you run both version simultaneously, make sure to specify the correct port.

Cannot connect to MySQL server via command line while Workbench can work

I have a MySQL server running on Windows 7 (technically on a virtual machine but I don't think that matters). I have configured everything and it seemed fine at first. I tried to connect to the server via command line and it worked. Then I tried to connect to it via Workbench and succeeded again. However, I can no longer connect to the server with command prompt ever since that. The client machine is in a different sub-network.
My command is like:
mysql -host HOST_IP -P PORT -uUSER -pPASSWORD
And it returns:
ERROR 2005 (HY000): Unknown MySQL server host 'ost' (0)
The problem is that while I can connect to the server via Workbench, the command line just won't work. It all happens after I connected with Workbench. Does it has anything to do with Workbench? Or is caused by other issues?

Excel VBA to connect to MySQL on linux server

I am trying to connect to MySQL database using VBA from my local machine. The database is in the linux server(XXXX.xxx.edu). I have the SSH client in my machine through which I connect to the *****.xxx.edu server. Once when I login and use the below command, I am able to access the MySQL database without any problem.
mysql -p -h XXXX.XXX.edu -u username dbname
However,I need to run the VBA in my machine and insert the values into this database. I tried to connect using the code mentioned in the below link.
Error in VBA:`[Microsoft][ODBC Manager] Data source name not found and no default driver specified
As told in the suggestion of the above link, I installed the MYSQL ODBC drivers which installed the MySQL 5.5 in my machine. Even after installing, I get the error,
[Microsoft][ODBC Manager] Data source name not found and no default driver specified
I am not able to figure out what exactly is the problem. How should I connect to the linux server and then connect to the MySQL database?
you install the mysql odbc driver (the msi) from here.
http://dev.mysql.com/downloads/connector/odbc/
you run ODBC Data Source Administrator
go to System DSN
click Add
select, for instance, MySql ODBC Unicode Driver
click finish.
dns name: fred
description: fred
tcpip server: 192.168.1.11 (whatever, dns, so long as u can point to it)
port 3306
user: root (whatever)
pwd: whatever works
drop down database, click test or view them