M
M
Michail2021-03-28 17:18:33
MySQL
Michail, 2021-03-28 17:18:33

How to use nginx as a proxy for mysql?

Good afternoon.
There is a VDS on it is ngnx which is available by ip address. Mysql is also raised on vds on localhost.
Is there a way to reach the database through nginx?

This is necessary so that from a locally raised server on the machine it will connect to the base, for the time being.
Thanks

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2021-03-28
@Michail_04

nginx can NOT only proxy http/https traffic.
https://docs.nginx.com/nginx/admin-guide/load-bala...
Another point is that this is a terrible crutch and it is better not to do this.
but if you really want to, here's an example, straight from the nginx site
https://www.nginx.com/blog/scaling-mysql-tcp-load-...
and yes, I join the commentary about what is possible in the database without nginx connect quite successfully..

A
Alexey Dmitriev, 2021-03-28
@SignFinder

No. nginx only proxies http\https traffic.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question