ProxySQL: Can't connect after install

I’m glad to hear that you were able to fix the issue. :slight_smile:

I had similar issues connecting to ProxySQL 1.4.12-9. There were three problems: [LIST=1]
[]The default ‘admin’ user can only connect locally (see documentation)
[
]The admin user cannot be called ‘proxysql’ (I cannot find this documented anywhere)
[*]After configuration file changes the ProxySQL service must be stopped ()
[/LIST]

hello , I think proxysql-admin is not a good tool for seting up proxysql.
The easy way is you config /etc/proxysql.conf and then “systemctl start proxysql”
Then you will see new files generated in /var/lib/proxysql, your proxysql will be initialed

The following is what i use to initial my proxysql:

cat > /etc/proxysql.cnf<<EOF

In order to FORCE a re-initialise of the on-disk database from the configuration file

the ProxySQL service should be started with “service proxysql initial”.

ex:proxysql --initial -f -c /etc/proxysql.cnf

datadir=“/var/lib/proxysql”
errorlog=“/var/lib/proxysql/proxysql.log”

admin_variables=
{
admin_credentials=“admin:xxxxx;proxysql:xxxxxx”
mysql_ifaces=“0.0.0.0:6032”
}

mysql_variables=
{
threads=8
max_connections=1500
default_query_delay=0
default_query_timeout=36000000
have_compress=true
poll_timeout=2000
interfaces=“0.0.0.0:3306”
default_schema=“information_schema”
stacksize=1048576
server_version=“5.7.26”
connect_timeout_server=3000
monitor_username=“proxysql_monitor”
monitor_password=“xxxxxxxxxxx”
monitor_history=600000
monitor_connect_interval=60000
monitor_ping_interval=10000
monitor_read_only_interval=1500
monitor_read_only_timeout=500
ping_interval_server_msec=120000
ping_timeout_server=500
commands_stats=true
sessions_sort=true
connect_retries_on_failure=10
}

defines all the MySQL servers

mysql_servers =
(

)

defines all the MySQL users

mysql_users:
(
{
username = “proxysql_user”
password = “xxxxxxxxx”
default_hostgroup = 10
active = 1
}
)

EOF

After initialing proxysql,then add mysql servers ,mysql users, mysql rules etc…to your proxysql
it 's easy.