I have setup the proxysql on MySQL master for read and write splitting. MySQL master and slave, proxysql server is running, however, I got an Access denied
error in the proxysql terminal.
[devops@DRMBUST05 ~]$ mysql -uproxysql -p**** -h 127.0.0.1 -P 6033
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 2
Server version: 5.5.30 (ProxySQL)
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
mysql> show databases;
ERROR 1045 (28000): Access denied for user 'proxysql'@'172.17.222.175' (using password: YES)
mysql>
here is the proxysql.log
:
2020-04-26 16:37:16 mysql_connection.cpp:835:handler(): [ERROR] Failed to mysql_real_connect() on 172.17.222.175:33003 , FD (Conn:31 , MyDS:31) , 1045: Access denied for user 'proxysql'@'172.17.222.175' (using password: YES).
2020-04-26 16:37:16 mysql_connection.cpp:835:handler(): [ERROR] Failed to mysql_real_connect() on 172.17.222.175:33003 , FD (Conn:31 , MyDS:31) , 1045: Access denied for user 'proxysql'@'172.17.222.175' (using password: YES).
2020-04-26 16:37:16 mysql_connection.cpp:835:handler(): [ERROR] Failed to mysql_real_connect() on 172.17.222.175:33003 , FD (Conn:31 , MyDS:31) , 1045: Access denied for user 'proxysql'@'172.17.222.175' (using password: YES).
I’m sure I can connect to MySQL master and slave with the username and password configured in proxysql, like this:
[devops@DRMBUST05 ~]$ mysql -u proxysql -h 127.0.0.1 --port 33003 -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 1152
Server version: 8.0.16 MySQL Community Server - GPL
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| devops |
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
5 rows in set (0.00 sec)
mysql>
Is this because I installed the proxysql on MySQL master? Does anybody know what’s wrong? Any tips will be appreciated.
I’m testing a future implementation of proxysql on ubuntu/xenial64 vagrant/virtualbox and it mostly works, however, there is an intermittent issue authorisation error at the ProxySQL level.
Test script:
<?php
while (true) {
$dbconn = @mysqli_connect('127.0.0.1:6033', 'web-user', 'alphabeticalcharactersonly');
if ($dbconn === false) {
echo "n";
echo mysqli_connect_error();
} else {
echo '.';
#mysqli_close($dbconn);
}
}
Output:
ProxySQL Error: Access denied for user 'web-user'@'127.0.0.1' (using password: NO)
ProxySQL Error: Access denied for user 'web-user'@'127.0.0.1' (using password: YES)..............................................................................................
ProxySQL Error: Access denied for user 'web-user'@'127.0.0.1' (using password: NO)...
ProxySQL Error: Access denied for user 'web-user'@'127.0.0.1' (using password: YES).
ProxySQL Error: Access denied for user 'web-user'@'127.0.0.1' (using password: YES)....
ProxySQL Error: Access denied for user 'web-user'@'127.0.0.1' (using password: YES)............
ProxySQL Error: Access denied for user 'web-user'@'127.0.0.1' (using password: YES).....................
ProxySQL Error: Access denied for user 'web-user'@'127.0.0.1' (using password: YES)................
ProxySQL Error: Access denied for user 'web-user'@'127.0.0.1' (using password: YES)................................................
ProxySQL Error: Access denied for user 'web-user'@'127.0.0.1' (using password: YES).............
ProxySQL Error: Access denied for user 'web-user'@'127.0.0.1' (using password: YES)........
ProxySQL Error: Access denied for user 'web-user'@'127.0.0.1' (using password: YES).........
ProxySQL Error: Access denied for user 'web-user'@'127.0.0.1' (using password: YES)..
ProxySQL Error: Access denied for user 'web-user'@'127.0.0.1' (using password: YES)....
ProxySQL Error: Access denied for user 'web-user'@'127.0.0.1' (using password: YES).....................................
ProxySQL Error: Access denied for user 'web-user'@'127.0.0.1' (using password: YES)...............................
ProxySQL Error: Access denied for user 'web-user'@'127.0.0.1' (using password: YES)...
ProxySQL Error: Access denied for user 'web-user'@'127.0.0.1' (using password: YES)........
ProxySQL Error: Access denied for user 'web-user'@'127.0.0.1' (using password: YES).....
When I had mysql_servers in place, logging errors, there weren’t access denied messages in the mysql logs. I removed mysql_servers to double-check, and the error still happens, so imho, it’s happening at the ProxySQL layer.
What I do not understand is why sometimes it says it is NOT using a password, and how/why, when a password is being supplied, it is coming back as access denied.
It’s also fairly random, given the number of ‘.’ on the end of each line changes.
It gets stranger…
When using PHP’s mysql_connect()
function, if mysql_close()
is called as below, then the errors as above happen. If the connection is NOT closed, it always connects perfectly!
<?php
while (true) {
$dbconn = @mysql_connect('127.0.0.1:6033', 'web-user', 'alphabeticalcharactersonly');
if ($dbconn === false) {
echo "n";
echo mysql_error();
} else {
echo '.';
mysql_close($dbconn);
}
}
So I think there’s a bug somewhere — it’s totally repeatable on two separate virtualboxes (albeit both came from the same base box, so identical environments)
If useful:
root@one:~# proxysql --version
ProxySQL version 2.0.1-4-gac2e710, codename Truls
ProxySQL> select * from mysql_users;
+------------------+-------------------------------------------+--------+---------+-------------------+----------------+---------------+------------------------+--------------+---------+----------+-----------------+---------+
| username | password | active | use_ssl | default_hostgroup | default_schema | schema_locked | transaction_persistent | fast_forward | backend | frontend | max_connections | comment |
+------------------+-------------------------------------------+--------+---------+-------------------+----------------+---------------+------------------------+--------------+---------+----------+-----------------+---------+
| debian-sys-maint | *F58D96A25085ACF47A6FE5A521607B0A7B5251E1 | 1 | 0 | 0 | | 0 | 1 | 0 | 1 | 1 | 9999999 | |
| orchestrator | *F58D96A25085ACF47A6FE5A521607B0A7B5251E1 | 1 | 0 | 0 | | 0 | 1 | 0 | 1 | 1 | 9999999 | |
| shareddb | *F58D96A25085ACF47A6FE5A521607B0A7B5251E1 | 1 | 0 | 0 | | 0 | 1 | 0 | 1 | 1 | 9999999 | |
| xroot | *F58D96A25085ACF47A6FE5A521607B0A7B5251E1 | 1 | 0 | 0 | | 0 | 1 | 0 | 1 | 1 | 9999999 | |
| web-user | *F58D96A25085ACF47A6FE5A521607B0A7B5251E1 | 1 | 0 | 0 | | 0 | 1 | 0 | 1 | 1 | 9999999 | |
+------------------+-------------------------------------------+--------+---------+-------------------+----------------+---------------+------------------------+--------------+---------+----------+-----------------+---------+
I have setup the proxysql on MySQL master for read and write splitting. MySQL master and slave, proxysql server is running, however, I got an Access denied
error in the proxysql terminal.
[devops@DRMBUST05 ~]$ mysql -uproxysql -p**** -h 127.0.0.1 -P 6033
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 2
Server version: 5.5.30 (ProxySQL)
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
mysql> show databases;
ERROR 1045 (28000): Access denied for user 'proxysql'@'172.17.222.175' (using password: YES)
mysql>
here is the proxysql.log
:
2020-04-26 16:37:16 mysql_connection.cpp:835:handler(): [ERROR] Failed to mysql_real_connect() on 172.17.222.175:33003 , FD (Conn:31 , MyDS:31) , 1045: Access denied for user 'proxysql'@'172.17.222.175' (using password: YES).
2020-04-26 16:37:16 mysql_connection.cpp:835:handler(): [ERROR] Failed to mysql_real_connect() on 172.17.222.175:33003 , FD (Conn:31 , MyDS:31) , 1045: Access denied for user 'proxysql'@'172.17.222.175' (using password: YES).
2020-04-26 16:37:16 mysql_connection.cpp:835:handler(): [ERROR] Failed to mysql_real_connect() on 172.17.222.175:33003 , FD (Conn:31 , MyDS:31) , 1045: Access denied for user 'proxysql'@'172.17.222.175' (using password: YES).
I’m sure I can connect to MySQL master and slave with the username and password configured in proxysql, like this:
[devops@DRMBUST05 ~]$ mysql -u proxysql -h 127.0.0.1 --port 33003 -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 1152
Server version: 8.0.16 MySQL Community Server - GPL
Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| devops |
| information_schema |
| mysql |
| performance_schema |
| sys |
+--------------------+
5 rows in set (0.00 sec)
mysql>
Is this because I installed the proxysql on MySQL master? Does anybody know what’s wrong? Any tips will be appreciated.
Содержание
- Access denied while connecting via proxysql to MySQL pxc #3672
- Comments
- The above error log is when i gave FQDN and below is when i gave IP for the endpoint :
- Intermittent access denied errors at ProxySQL level #1879
- Comments
- Footer
- Access denied for user ‘user’@’ip’ #2436
- Comments
Access denied while connecting via proxysql to MySQL pxc #3672
The issue which i m facing is i m connecting proxysql > pxc MySQL so when try to connect via proxysql to MySQL it shows a error
2021-10-23 17:39:57 mysql_connection.cpp:835:handler(): [ERROR] Failed to mysql_real_connect() on mysql-cluster-rg-1-haproxy.mysql1.svc.cluster.local:3306 , FD (Conn:32 , MyDS:32) , 1045: Access denied for user ‘root’@’10.56.0.102’ (using password: YES).
2021-10-23 17:40:23 MySQL_Session.cpp:5234:handler___status_CONNECTING_CLIENT___STATE_SERVER_HANDSHAKE(): [ERROR] ProxySQL Error: Access denied for user ‘root’@’127.0.0.1’ (using password: YES)
why does ha-proxy comes here from the above error ?
It is because i m using a percona MySQL operator in K8s so when i spin up a percona operator i enable ha-proxy and then the ha-proxy monitors the pxc nodes and re-directs the connection to the active node.
Thats the reason i use ha-proxy, In this use case i use a proxysql to redirect the incoming connections to the particular endpoint as mention in proxysql.cnf (mysql_servers,mysql_users) section.
—-> i have added two percona operator in different namespace and deployed proxysql docker container as a pod in a namespace so all these 3 namespace have network connection between them.
- The expectation was using the details from proxysql.cnf proxysql should redirect the request to the endpoint regardless of whether its forwarding the request to a ha-proxy or MySQL it should just forward the request.
1.instead what really happen was it was showing a Access denied, but when i directly connect to the ha-proxy i m able to login and do all kind of query’s.
I have attached the image below
F.Y.I
I have port forward it to local so it shows 127.0.0.1 instead of showing the actual IP in the error .
2.Initially i thought it was because of caching_sha2_password and i should set admin-hash_passwords=false but it was not the case since when i checked the password mechanism of pxc it was mysql_native_password so it shouldn’t be a issue since proxysql supports mysql_native_password mechanism.
In mysql_servers details section in proxysql.cnf i try to give FQDN then later i gave the IP both it reaches endpoint of ha-proxy but doesn’t connect and login it shows access denied.
while connecting to ha-proxy directly then using show processlist query i can see proxysql monitor user is able to connect to both the operator and able to monitor it. then why proxysql not connecting with root user in those operator. i even try to use different users but no luck same result only monitor user seems connecting to ha-proxy via proxysql
ProxySQL version
I have used docker versions tag : latest, 2.3.2 ,2.3.0 ,2.0.16 all gave the same issue
The steps to reproduce the issue
using this link you can deploy two operators but in deploy/cr.yaml file just change the metadata as
https://github.com/percona/percona-xtradb-cluster-operator/tree/main/deploy
In one namespace
metadata:
name: mysql-cluster-rg-1
and another namespace
metadata:
name: mysql-cluster-rg-2
Just clone the code in two different folders and deploy it in different namespace
then run these three commands to install operator
kubectl apply -f bundle.yaml -n namespace eg.mysql1 and mysql2 for another namespace
kubectl apply -f cr.yaml -n namespace
kubectl apply -f secrets.yaml -n namespace
For testing change the root password in second operator so while connecting to proxysql you can identify whether your connecting so primary or secondary operator.
- The package used to install ProxySQL
To deploy proxysql docker as a pod in K8s you can use this link :
https://github.com/ProxySQL/kubernetes/tree/master/proxysql-cluster
In the folder name files/ you will find the proxysql.cnf so you can replace those details with the my proxysql.cnf which i have added below then give a helm install proxysql-test proxysql-cluster/
—> ( syntax ) helm install release name then the folder name
Then using kubectl port-forward command you can port-forward to your local using the svc
kubectl port-forward svc/proxysql-test 6033:6033 -n namespace
same you can
- The full ProxySQL error log (default location: /var/lib/proxysql/proxysql.log )
The above error log is when i gave FQDN and below is when i gave IP for the endpoint :
Hope i have provided all the necessary details to reproduce the issue, the only thing i expect is proxysql should forward the request based on the details proved in proxysql.cnf .
Thanks in Advance
The text was updated successfully, but these errors were encountered:
Источник
Intermittent access denied errors at ProxySQL level #1879
I’m testing a future implementation of proxysql on ubuntu/xenial64 vagrant/virtualbox and it mostly works, however, there is an intermittent issue authorisation error at the ProxySQL level.
When I had mysql_servers in place, logging errors, there weren’t access denied messages in the mysql logs. I removed mysql_servers to double-check, and the error still happens, so imho, it’s happening at the ProxySQL layer.
What I do not understand is why sometimes it says it is NOT using a password, and how/why, when a password is being supplied, it is coming back as access denied.
It’s also fairly random, given the number of ‘.’ on the end of each line changes.
It gets stranger.
When using PHP’s mysql_connect() function, if mysql_close() is called as below, then the errors as above happen. If the connection is NOT closed, it always connects perfectly!
So I think there’s a bug somewhere — it’s totally repeatable on two separate virtualboxes (albeit both came from the same base box, so identical environments)
The text was updated successfully, but these errors were encountered:
Just to add — I’ve now tried this on a «normal» non-virtualbox machine and it works fine. But on a clean ubuntu/xenial64 vagrant machine, it is reliably breaking as above. Very, very strange.
Hi @ejellard , can you share Vagrantfile , so we try to reproduce it?
I want to make sure we run the same OS version, as well as PHP and client library versions.
Furthermore, does this issue happen with a specific password, or a «random» password like password or alphabeticalcharactersonly makes it fail too?
I am seeing this behaviour also. I am finding that if I specify a database when connecting, the intermittent errors do not occur. I’d be interested to know what happens if @ejellard changes his example above to this:
$dbconn = @mysqli_connect(‘127.0.0.1:6033’, ‘web-user’, ‘alphabeticalcharactersonly’, ‘database’);
Without the database name when connecting, I find that I get the auth errors about 7% of the time.
Apologies for the delay — my mail filters github emails.
I can sadly reproduce this on a plain ubuntu box too (16.04, fresh install, with some standard packages installed) — so turns out this isn’t just vagrant.
RE passwords — it fails with anything — my password had lowercase letters and numbers only.
However, @md-mkane ‘s fix is brilliant — works a treat and good enough for us, albeit somewhat strange.
Hi,
We are suffering what it seems the same issue, in our case we have several applications in several languages framework and this problem appeared just in one old PHP 5.6.38 application.
We tested both with mysql_connect and mysqli and we are having random access denied (approx 7% of tries), only for this application, there is no framework no other connections just a php file with one connection.
This is the only message logged (user and ip have been removed):
In our case this is happening in a docker environment using docker hub image «php:5.6-apache»
Hi again,
We found our issue, previously our petitions were managed by 5 haproxy instances to 3 mariadb galera cluster without issues.
When we have replace haproxy with proxysql we found this issue. More debugging lead that requests to mariadb «galera cluster instance 1» are using a different source IP (which is not allowed) so they are blocked. So this is not an issue in our case related to proxysql but to the different network addressing.
The «old php application» container is living in the same host as «galera cluster instance 1», we need still check why this problem was not so common with haproxy, probably because a different routing was configured and the «old php application»was not doing requests to «galera cluster instance 1» never.
The issue was more difficult to identify with proxysql due to it’s balance routing that in most queries did not caused the error.
So ignore my previous comment, it seems this is not your situation as you always use the same source 127.0.0.1 address.
Cheers
Here I am again fixed the issue mentioned in the previous post, but still getting random user denied. We identified this issue in 2 of the 3 proxies.
We are opening mysql users for all source ips «%» to isolated the issue and verify if it is really a «access denied due to the source ip»
I will keep you posted if we are able to fix this.
We cannot reproduce the error using php either mysqli or PDO, but we still suffer with the original mysql_connect intermitent «user denied» issue. So, as mysql_connect is really deprecated by now, we can argue that it is not reliable and probably there is an issue of its connect implementation that is not fully compliant with what proxysql is expecting.
The issue is still present but it is not practically for us spending more resources on catching a old bug probably related to the deprecated mysql_connect, we are for this old application querying directly one of the mariadb instances and avoiding the proxysql for this case.
If someone cross this issue in the future and finds the actual issue we can check the possible fix and confirm the resolution.
Hello, We decided to replace MaxScale with ProxySQL for extra caching facility. Everything was working fine except 4% ‘ Access denied for user’ error. The exact error is
MySQL_Session.cpp:3966:handler___status_CONNECTING_CLIENT___STATE_SERVER_HANDSHAKE(): [ERROR] ProxySQL Error: Access denied for user ‘user’@’ip.ip.ip.ip’ (using password: YES)
And my global variable table is following (connection related)
- mysql-connect_retries_delay = 1
- mysql-connection_delay_multiplex_ms =0
- mysql-connection_max_age_ms= 0
- mysql-connect_timeout_server_max =10000
- mysql-free_connections_pct = 10
- mysql-throttle_connections_per_sec_to_hostgroup =1000000
- mysql-binlog_reader_connect_retry_msec=3000
- mysql-max_stmts_per_connection=20
- mysql-reset_connection_algorithm = 2
- mysql-kill_backend_connection_when_disconnect=true
- mysql-default_reconnect=true
- mysql-init_connect=
- admin-stats_mysql_connections =60
- admin-stats_mysql_connection_pool =60
- mysql-max_connections= 1000
- mysql-connect_timeout_server =60000
- mysql-monitor_connect_interva=2000
- mysql-connect_retries_on_failure= 10
- mysql-monitor_connect_timeout =200
Unfortunately, I can also confirm that this error has been showing intermittently for my installations of 2.0.2 on CentOS 7.6
When I run an infinite loop of connections, I can reproduce this 100% on proxysql-2.0.2-1.x86_64
Reviewing our upgrade logs, this started appearing in version 1.4.13-1.1.el7 and is present in 2.0.2
Which version of mysql client library are you using?
Commit 8450d85 is likely to be the fix
Hi @renecannao — Thanks for the quick attention to this.
We have a number of client libraries being used, but I was able to validate the issue with the 8.0.15 OSX homebrew-provided mysql 8.0.15 library.
I believe the majority of clients using this service are k8s pods using github.com/go-sql-driver/mysql and Centos 7 base images with the MySQL community client library 5.7.2[45] binaries.
Hi @ernstae .
Ok, it you are using client library 8.0.15, it is likely you are hitting the bug fixed in commit 8450d85 . Around 7.8% of the authentication requests using 8.0 library should fail.
Fixed in 2.0.3 .
Closing
© 2023 GitHub, Inc.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Источник
Access denied for user ‘user’@’ip’ #2436
Hi all,
After an upgrade of version from ProxySQL version v2.0.0 to 2.0.8 we are getting the following intermittent error:
MySQL_Session.cpp:5094:handler___status_CONNECTING_CLIENT___STATE_SERVER_HANDSHAKE():« [ERROR] ProxySQL Error: Access denied for user `’user’@’ip’
In consequence, we did a rollback of version and errors disappeared, the upgrade was only of ProxySQL and we keep the same database. Also, we keep the same configuration for mysql_users.
- Details :
OS : PRETTY_NAME=»Centos 6 »
ProxySQL Version: ProxySQL version 2.0.8-67-g877cab1, codename Truls
Error log of Proxysql 2.0.8-67:
MySQL_Session.cpp:5094:handler___status_CONNECTING_CLIENT___STATE_SERVER_HANDSHAKE():[ERROR] ProxySQL Error: Access denied for user ‘user’@’ip’ (using password: YES) MySQL_Session.cpp:5094:handler___status_CONNECTING_CLIENT___STATE_SERVER_HANDSHAKE():[ERROR] ProxySQL Error: Access denied for user ‘user’@’ip’ (using password: YES) MySQL_Session.cpp:5094:handler___status_CONNECTING_CLIENT___STATE_SERVER_HANDSHAKE():[ERROR] ProxySQL Error: Access denied for user ‘user’@’ip’ (using password: YES) MySQL_Session.cpp:5094:handler___status_CONNECTING_CLIENT___STATE_SERVER_HANDSHAKE():[ERROR] ProxySQL Error: Access denied for user ‘user’@’ip’ (using password: YES) MySQL_Session.cpp:5094:handler___status_CONNECTING_CLIENT___STATE_SERVER_HANDSHAKE():[ERROR] ProxySQL Error: Access denied for user ‘user’@’ip’ (using password: YES) MySQL_Session.cpp:5094:handler___status_CONNECTING_CLIENT___STATE_SERVER_HANDSHAKE():[ERROR] ProxySQL Error: Access denied for user ‘user’@’ip’ (using password: YES) MySQL_Session.cpp:5094:handler___status_CONNECTING_CLIENT___STATE_SERVER_HANDSHAKE():[ERROR] ProxySQL Error: Access denied for user ‘user’@’ip’ (using password: YES) MySQL_Session.cpp:5094:handler___status_CONNECTING_CLIENT___STATE_SERVER_HANDSHAKE():[ERROR] ProxySQL Error: Access denied for user ‘user’@’ip’ (using password: YES)
I saw others issues like this one but looks like was fixed in the version we are using. Are there any big change on authentication user from v 2.0.0 to 2.0.8.. is it possible check it?
The text was updated successfully, but these errors were encountered:
Источник
I’m trying to set up a xtraDB Cluster consisting of 3 nodes. Now i’ve got the cluster up and running and per the instructions i’m trying to set up ProxySQL for load balancing.
So i’ve installed proxySQL on all 3 nodes. And now i’m trying to configure it with the admin tool. But everytime that i run the command:
[root@node1 log]# proxysql-admin --config-file=/etc/proxysql-admin.cnf --enable
It comes back with:
This script will assist with configuring ProxySQL (currently only Percona XtraDB cluster in combination with ProxySQL is supported)
ProxySQL read/write configuration mode is singlewrite
ERROR 1045 (28000): ProxySQL Error: Access denied for user 'proxysql_admin'@'' (using password: YES)
Please check the ProxySQL connection parameters! Terminating.
Now i would say the error is pretty straight forward. However i have the user proxysql_admin properly defined in both the MySQL cluster and in the .cnf files.
Here’s my proxysql-admin.cnf file:
# proxysql admin interface credentials.
export PROXYSQL_DATADIR='/var/lib/proxysql'
export PROXYSQL_USERNAME='proxysql_admin'
export PROXYSQL_PASSWORD='placeholder_pass'
export PROXYSQL_HOSTNAME='localhost'
export PROXYSQL_PORT='6032'
# PXC admin credentials for connecting to pxc-cluster-node.
export CLUSTER_USERNAME='proxysql_admin'
export CLUSTER_PASSWORD='placeholder_pass'
#export CLUSTER_HOSTNAME='localhost'
export CLUSTER_HOSTNAME='ccloud'
export CLUSTER_PORT='3306'
# proxysql monitoring user. proxysql admin script will create this user in pxc to monitor pxc-nodes.
export MONITOR_USERNAME='monitor'
export MONITOR_PASSWORD='placeholder_pass'
# Application user to connect to pxc-node through proxysql
export CLUSTER_APP_USERNAME='proxysql_user'
export CLUSTER_APP_PASSWORD='placeholder_pass'
# ProxySQL read/write hostgroup
export WRITE_HOSTGROUP_ID='10'
export READ_HOSTGROUP_ID='11'
# ProxySQL read/write configuration mode.
export MODE="singlewrite"
# ProxySQL Cluster Node Priority File
export HOST_PRIORITY_FILE=$PROXYSQL_DATADIR/host_priority.conf
Here’s the user on the mysql cluster:
mysql> select User,Host from mysql.user;
+----------------+-----------+
| User | Host |
+----------------+-----------+
| proxysql_admin | |
| proxysql_admin | % |
| mysql.session | localhost |
| mysql.sys | localhost |
| proxysql_admin | localhost |
| proxysql_user | localhost |
| root | localhost |
| sstuser | localhost |
+----------------+-----------+
I’ve tried changing up the interfaces a few times but that doesn’t seem to be the problem.
Anyone have any idea why my user isn’t connecting?
Just in case, here’s the my.cnf of the cluster on the node i’m trying this on:
#
# The Percona XtraDB Cluster 5.7 configuration file.
#
#
# * IMPORTANT: Additional settings that can override those from this file!
# The files must end with '.cnf', otherwise they'll be ignored.
# Please make any edits and changes to the appropriate sectional files
# included below.
#
!includedir /etc/my.cnf.d/
!includedir /etc/percona-xtradb-cluster.conf.d/
[mysqld]
server-id=1
datadir=/mysql-data
socket=/mysql-data/mysql.sock
pid-file=/var/run/mysqld/mysqld.pid
wsrep_provider=/usr/lib64/galera3/libgalera_smm.so
wsrep_cluster_name=ccloud
wsrep_cluster_address=gcomm://ip1,ip2,ip3
wsrep_node_name=pxc1
wsrep_node_address=ip1
wsrep_sst_method=xtrabackup-v2
wsrep_sst_auth=sstuser:placeholder_pass
pxc_strict_mode=ENFORCING
binlog_format=ROW
default_storage_engine=InnoDB
innodb_autoinc_lock_mode=2