How do I configure ProxySQL to connect to MySQL?

1,412 views
Skip to first unread message

Ikai Lan

unread,
Jan 18, 2017, 1:20:16 PM1/18/17
to proxysql
Hi everyone, ProxySQL newbie here!

I've gone through the docs, but I'm having problems understanding how I should configure ProxySQL. Here's my current setup:

1. I have mysql set up at mysql.mydomain.internal
2. The credentials for that are mysql / sqlpassword

In /etc/proxysql.conf, I have this setup:

mysql_servers =
(
{
   address = "mysql.mydomain.internal" # no default, required . If port is 0 , address is interpred as a Unix Socket Domain
   port = 3306           # no default, required . If port is 0 , address is interpred as a Unix Socket Domain
   hostgroup = 0           # no default, required
   status = "ONLINE"     # default: ONLINE
}
}

mysql_users:
(
{
   username = "mysql" # no default , required
   password = "sqlpassword" # default: ''
}

Should I be able to connect through the proxy to MySQL through the command line interface?

# mysql -h 127.0.0.1 -P 6032 -u mysql -p

I've also added users to the mysql_users database, but I can't connect to the proxy via those, and I've tried the different flush/read to/from memory/runtime/disk combinations.

Besides the wiki, is there a more comprehensive set of documentation somewhere?


Thanks!

- Ikai

René Cannaò

unread,
Jan 18, 2017, 1:39:54 PM1/18/17
to Ikai Lan, proxysql
Hi Ikai,

Port 6032(by default)  is the port used by the "Admin interface" : this interface allows to configure (and get metrics) ProxySQL using a normal mysql client.
To connect to MySQL servers through the proxy you should connect to port 6033 (by default).


--
You received this message because you are subscribed to the Google Groups "proxysql" group.
To unsubscribe from this group and stop receiving emails from it, send an email to proxysql+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages