I have a mysql server running on the standard port which is having data fed into it. I would like to capture this information using node.js as it goes into the server so my plan is to set node.js up on the mysql port and proxy the requests.
How easy would this be to do and could I easily sniff for the data?
Thanks
Related
I see there is a mock mysql functionality out of the box from mysql installation and it is documented here
It involves, setting up a mock tcp port with binary called ./mysql_server_mock but I couldn't find this in my installation. I installed MySQL 8.0.30 (Windows) and also the MySQL Router but couldn't find this binary. Are there are any other easy way, where a MySQL client sends a request, we in local machines intercept that request and respond with some other results? (Similar to Burp for Web, all locally)
I am a newbie in software architecture and I have some question:
I don't understand which requests is sent to the HAProxy on this image.
I mean: if one "Application" Server (backend) want to save data in the Galera Cluster
what is the request that will be sent to the HAProxy?
Is it an sql query "request"?
If it is an sql query should the HAProxy server needs a mysql-server to "handle" the connection?
Should Application Server needs to be configured to make an sql connection to the HAProxy?
from: https://fromdual.com/making-haproxy-high-available-for-mysql-galera-cluster
Thanks!
The application only needs to know the IP address of the VIP in this architecture. The app connects to that VIP using a MySQL connector, as if it is a MySQL Server.
The "requests" are then stateful TCP/IP connections using the MySQL protocol, just as if the app were connected directly to a MySQL node.
This is not a series of stateless http requests. You might be assuming that HAProxy is only for load-balancing http requests. In fact, HAProxy can be used for other protocols than http.
I am designing the backend of my ios application. The backend has separate database and application server running mysql and django separately in different machines. Till now, I have connected my application server with my database server in simple way: I changed the database host in application server settings to point to remore database server and created a new remote host in database server configuration files allowing remote application server to access the database. All works fine and I have decided to go with this setup for production. Then when I was reading Instagram engineering blog, I saw them mentioning 'Pgbouncer' to pool connection to their postgresql database server. What is the need for something like this? Has this got something to do with only performance, or is this a production friendly approach to use something like this for communication between database and application server. Is my general approach mentioned too amateur?
Your approach is not amateur at all. The purpose of bouncer in your case would be to eliminate connection time that happens on each request django handles. For example, on Heroku, which is hosted on AWS servers, this could eat up 40-50ms of each request.
Now, if you had a master/slave setup or something like that, a connection pool would also provide you a failover functionality (just an example)
I am trying to create a simple program that create a proxy between a MySQL-based application and a MySQL server.
Right now,my approach is to change the application to talk to MySQL at port 3065 and my proxy is a simple socket server whose listens to all requests and sending them to MySQL server.
I wanted to change the architecture and I saw this page : http://dev.mysql.com/doc/refman/5.0/en/mysql-proxy-scripting.html, In this page I have exactly what I need - read_query() and read_query_results().
And my main problem is - they are using LUA as the proxy`s scripting language,How can I use this API in NodeJS?
I have a hosting account at godaddy ruinning Linux. Is has MySQL. I am creating a J2ME application that runs on android and I was wondering if there is any simpler way to connect from j2me application to my MySQL server?
Is it required to install anything at my server? which I cannot do because of the shared account. Any way to just open the connection, update some data in the MySQL from j2me application?
It is quite simple. You just need to do HTTP application/x-url-form-encoded request on the midlet and set request property to HTTP.POST. Then stream form data as bytes. Receive those post variable using a server side language (i used PHP) like $_POST['var'] and in that server script write MySQL query like insert into .. VALUES.. etc.
I don't know if any DB drivers exist for J2ME. If you can't find them just make layer on the server and implement your own protocol for retrieving data via http or sockets