I am getting an error in Toad Edge 2.1.5 for the MySQL database.
For one of the databases, the same JDBC is working for another database with the same version of MySQL 8. it is giving the above error.
Kindly help me to rectify the error.
I'm using MySQL 8 Server in same machine.
I had the same problem and it worked connecting with root user. Make sure you are connecting with the same user than in the other successful connection.
In case you are trying with the same user, type this on your MySQL server console:
ALTER USER 'youruser'#'localhost' IDENTIFIED WITH mysql_native_password BY 'yourpassword';
It's necessary for authenticating in MySQL 8.
Related
I have a tomcat 8 webserver and try to connect local mysql 5.7, but having following error:
Caused by:
SQLNestedException: Cannot create PoolableConnectionFactory (Client does not support authentication protocol requested by server
I googled and people suggested to update the password and I did as well, however doesn't work for me.
What I did
ALTER USER 'root'#'localhost' IDENTIFIED WITH mysql_native_password BY 'password'
flush privileges;
Currently I can only use public ip address to connect back to the local database....
MYSQL changed the password storage method starting with version 4.1. If your client is trying to connect with the old way and the server has the password stored in the new way, then you will get that error message. In order to fix that, you have 2 choices:
check the settings on your tomcat server
change the password hash in the mysql server, to be compatible with versions pre-4.1
If you want to change the password to use the old hashing type, use a command like:
mysql> SET PASSWORD FOR
-> 'some_user'#'some_host' = OLD_PASSWORD('new_password');
After that you have to start your mysql server with old_passwords system variable set to 1
On the other hand, I think that the best way of resolving this will be to set the client to use the proper way of connecting to the mysql server.
If you use PHP for connecting to the server, check if you use mysql of mysqli library. I think that only mysqli library uses the new way of managing connections.
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.
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.
I am trying to install and test a MySQL ODBC Connector on my machine (Windows 7) to connect to a remote MySQL DB server, but, when I configure and test the connection, I keep getting the following error:
Connection Failed
[MySQL][ODBC 5.3(w) Driver]Access denied for user 'root'#'(my host)' (using password: YES):
The problem is, I can connect with MySQL Workbench (remotely - from my local machine to the remote server) just fine. I have read this FAQ extensively but it's not helping out. I have tried:
Checking if mysql is running on the server (it is. I even tried restarting it many times);
Checking if the port is listening for connection on the remote server. It is.
Connecting to the remote server using MySQL Workbench. It works.
Checking if the IP address and Ports of the remote database are correct;
Checking if the user (root) and password are correct;
Re-entering the password on the ODBC config window;
Checking and modifying the contents of the "my.conf" on the remote server to allow connections from all sides (0.0.0.0);
Including (my host) on the GRANT HOST tables from mySQL (I also tried the wildcard '%' but it's the same as nothing);
Running a FLUSH HOSTS; And FLUSH PRIVILEGES; command on the remote mySQL server to reset the privilege cache;
Turning off my Firewall during the configuration of the ODBC driver;
Checked if the MySQL variable 'skip_networking' is OFF in order to allow remote connections.
What is frustrating is that I can connect with MySQL Workbench on my local machine (with the same IP/user/password), just not with ODBC.
What could I be doing wrong, or what could be messing up my attempt to connect with ODBC?
Update: I managed to set up the ODBC driver and get it running correctly on the server side. I can connect there to the localhost using a command line (with the "isql" command). But I still can't connect over remotely with my Windows 7 machine.
Solved.
As it turns out, it was a permissions problem. I ran the following command on the remote server SQL:
GRANT ALL PRIVILEGES ON *.* TO 'root'#'(my_host)' IDENTIFIED BY '(my_password)';
I had run the previous command, but without the "IDENTIFIED BY" password. Then, to reset the mysql permissions cache, I also ran
FLUSH PRIVILEGES;
And now it works.
Worked for me too only with 64bit odbc driver not for mySQL 32 bit.
We had a similar case that 'user'#'%' was granted at server but ODBC connect failed at a PC while workbench connect successfully.
MariaDB 10.0.31,
MySQL ODBC 3.51,
MySQL Workbench 8.0
Solved by install MariaDB Connector/ODBC 3.1 instead of the MySQL ODBC (https://downloads.mariadb.org/connector-odbc/).
I get the following error when trying to make a jdbc connection to a mysql database:
Attempting to connect to jdbc:mysql://localhost/castel castel castel
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Access denied for user 'castel'#'%' to database 'castel'
I can connect to the database through the command line without a problem using the same credentials. I thought it might be a privilege issue so I ran:
GRANT ALL PRIVILEGES ON mysql.* TO 'castel'#'%'
Any help would be greatly appreciated.
OK the problem was completely unrelated to database configuration. It turns out my box had it's iptables configured to forward all traffic on port 3306 to another machine so I wasn't talking to the database that I thought was.