Questions tagged [mysql-proxy]

MySQL Proxy is a simple program that sits between the client and MySQL server that can monitor, analyze or transform their communication. It is used mainly for load balancing, failover and query analysis.

Useful Links

71 questions
11
votes
1 answer

mysql-proxy cleartext passwords

I have MySQL proxy running and I have a LUA with a function for read_auth() however the passwords that are passed during authentication are hashed (as expected). I require them in a format which I can work with and post onwards, so cleartext.…
Marcus Hughes
  • 5,123
  • 1
  • 25
  • 39
8
votes
2 answers

Anything similar to MySQL Proxy for PostgreSQL?

I am looking for something similar to MySQL Proxy. The purpose is to modify incoming queries on the server. I am not looking for alternative ways to achieve the same. My best guess at the moment is to modify GridSQL, but this adds complexity and it…
David
  • 4,786
  • 11
  • 52
  • 80
6
votes
4 answers

Linking MySQL Workbench to my Remote Server

I've just downloaded MySQL Workbench. But I don't quite understand how to syn this with the databases on my remote server. Work bench asks for "hostname" so I provided the hostname of my remote server. I designate port 3306. I then provide a…
Jeff
  • 3,943
  • 8
  • 45
  • 68
6
votes
1 answer

Is there a set of complete documentation for mysql-proxy lua scripting?

I am playing with scripting for mysql-proxy. What I am trying to accomplish is irrelevant. What I am finding, however, is that there appears to be elements of the lua interface that are undocumented. The big "smoking gun" I have is the…
jj33
  • 7,543
  • 2
  • 38
  • 42
5
votes
2 answers

admin-username error of proxy

I tried to install proxy on development machine and I got the following error. /etc/init.d/mysql-proxyd start Starting mysql-proxy: 2011-02-26 15:51:45: (critical) admin-plugin.c:569: --admin-username needs to be set 2011-02-26 15:51:45: (critical)…
shantanuo
  • 31,689
  • 78
  • 245
  • 403
5
votes
2 answers

How to trace MySql queries using MySql-Proxy?

I just downloaded the mysql-proxy and created this script lua (found in Mysql docs): function read_query(packet) if string.byte(packet) == proxy.COM_QUERY then print("QUERY: " .. string.sub(packet, 2)) end end This is the command-line…
Maico
  • 719
  • 7
  • 11
5
votes
1 answer

using mysql-proxy to manipulate login information

Is it possible to intercept and change login information within a lua script for mysql-proxy. for example, if a user were to hit the proxy like this: mysql -h localhost -P 4040 -u bob -D orders -p i would want the connection not only redirected to…
jesse_galley
  • 1,676
  • 4
  • 18
  • 30
4
votes
1 answer

PHP MySQL DSN Connections - How to enable mysql://

How do I enable this type of command on a mysql server and what is it? I see it client code: //$dsn = "mysql://root@localhost/username"; //$dsn = "mysql://admin@999.69.205.174/pass"; Normally I would…
TheBlackBenzKid
  • 26,324
  • 41
  • 139
  • 209
4
votes
1 answer

"Lost connection to MySQL server at 'handshake: reading initial communication packet', system error: 11" using docker sql proxy

Essentially, I have a SQL database on Google Cloud Platform and I am using the proxy docker image to establish a local connection for development for when I modify the mlflow docker image. I've spent a disgusting amount of time trying to debug this…
4
votes
2 answers

How to split Read traffic between multiple AWS RDS read replica and master?

I have web application which is communicating with AWS RDS (MYSQL). now we want to scale our database instance to reduce master traffic. so AWS RDS has provided "Read Replica" feature , through which we distributes traffic to reduce load on master.…
Bhavesh Modi
  • 303
  • 6
  • 18
3
votes
1 answer

Mysql-proxy and Lua how to transmit query to different server for sharding table?

I split all table to several db server .such as : table1/2/...10 in serverA, table11/12... in serverB. I want to achieve the goal: a sql query: select * from table1 ; use lua to transmit this query to serverA . if query table is in B, transmit it…
malphi
  • 31
  • 1
  • 3
3
votes
1 answer

MySQL Proxy Query Rewriting

I would like to change all SELECT COUNT(*) queries with SELECT COUNT(1) (for this use case). I have the following lua script, but it does not work somehow: function read_query( packet ) if string.byte(packet) == proxy.COM_QUERY then local…
Jonathan
  • 2,183
  • 4
  • 20
  • 25
3
votes
1 answer

How can i replace my queries with mysql-proxy or any possible way?

I have succesfully installed mysql-proxy and understood the way working and lua scripting. But I am not good at writing lua. So my problem is the software I use for web hosting keep creating mysql users with OLD_PASSWORD('') in the queries. I think…
Dali
  • 41
  • 5
3
votes
1 answer

sqlproxy: inject secrets into sqlproxy.cnf

I have a few proxysql (https://proxysql.com/) instances (running in Kubernetes). However, I don't want to hardcode the db credentials in the config file (proxysql.cnf). I was hoping I could use ENV variables but I wasn't able to get that to work.…
Gerb
  • 883
  • 12
  • 31
3
votes
2 answers

How to speedup the iterative insertion process in a stored procedure?

I am trying to execute a stored procedure which calls "INSERT" command multiple times in a loop. I want to speedup the insertion process and trying to use "RAM DISK" for this. Let me know the approach to deal with this kind of problem in MySql. I am…
Pradip Das
  • 728
  • 1
  • 7
  • 16
1
2 3 4 5