3

I installed ProxySQL in my server.

Server details : CentOS Linux release 7.5.1804 (Core)

ProxySQL version : proxysql-2.0.2-1-centos7.x86_64.rpm MaridaDB version : Distrib 10.3.7-MariaDB

Everything is working fine, but i am getting the following problem randomly.

 MySQL_Session.cpp:3966:handler___status_CONNECTING_CLIENT___STATE_SERVER_HANDSHAKE(): [ERROR] ProxySQL Error: Access denied for user 'user'@'*.*.*.*' (using password: YES)
Faiz Ahmed
  • 396
  • 6
  • 13
  • Is the error always for the same user and IP adress/host? – Raymond Nijland Mar 03 '19 at 14:54
  • No it's Random.. – Faiz Ahmed Mar 05 '19 at 09:34
  • 1
    I am facing the same problem. Same connection credentials sometimes work and sometimes don't. The same connection string sometimes connects and sometimes does not. mysql -ustnduser -pstnduser -h172.17.0.2 -P 6033 -e "select user(),current_user(),@@hostname" When I run the above commands it connects sometimes and sometimes not. mostly it connects. Please help resolve this issue. – Anup_Tripathi May 19 '22 at 13:40
  • @Anup_Tripathi, I am sorry. I actually forgot how I solved this. I should have written the solution at the time , I solved it. – Faiz Ahmed May 20 '22 at 00:35
  • @FaizAhmed, please try to recall and add the solution in a comment or as a reply to the question. – Anup_Tripathi May 20 '22 at 06:18
  • There's a general explanation and pointers to possible issue with a specific usecarse for this issue I read in this blog of proxysql connectivity issues -> https://kedar.nitty-witty.com/blog/can-not-connect-to-proxysql-reasons-and-fixtures – mysql_user Oct 13 '22 at 09:48

3 Answers3

1

I was facing the same problem and searched on the internet but could not get any workable solution. Then I downgraded the ProxySql from version 2.4.x to 2.2.x and it worked. It is now working perfectly fine. I tested it with sysbench too. Not a single connection loss (or Access denied error) was observed.

Anup_Tripathi
  • 2,817
  • 3
  • 26
  • 37
0

Make sure you create the same user in the underlying database server as well and from the application, you are connecting to proxy sql server on port 6033. Let me know if you face any issues.

Rahul Tokase
  • 1,048
  • 9
  • 25
0

Timezone difference with the connected server and the user can also be a reason for such ProxySQL errors, try setting the correct timezone.

PHP example:

date_default_timezone_set(“YOUR_TIME_ZONE”);

I was facing a similar problem and this helped me.