Answer the question
In order to leave comments, you need to log in
How to give webserver access to MySQL via SSH tunnel?
Good evening dear toaster users.
I'll immediately apologize if I'm inaccurate in something, because the question is not entirely according to my specifics.
(I’m just starting to communicate with Linux, and in general, an idiot ... a young programmer)
It so happened that not so long ago I started working in a young company, and ended up there (sorry for the bullshit) the first second programmer in the entire history of this enterprise. Previously, my current colleague worked exclusively alone, and of course directly with the ftp server. Then everything is as usual - the deadlines are burning, the authorities are pressing and, of course, there is not enough time for anything. And when we "crossed" for the second time on ftp and again spent 3 hours recovering the lost code, I managed to convince the authorities of the need to use a version control system.
It was decided to do the following:
Each programmer on a local server, who are connected via SSH tunnel to the server (which, of course, is located "somewhere") to work with the MySQL database and the Git repository (which has been idle on the server since time immemorial). Next, the last commit is loaded onto the server so that the authorities can pat us on the head (or kidneys), and the clients can admire the birth of their future site.
The key point is that only 127.0.0.1 has access to the database (for hackers, bots and other horrors of the Internet).
Actually, the authorities organized an ssh tunnel to a user with minimal access rights to the server in order to be able to use port forwarding and the Git repository. And then they say spin as you want.
About system configuration:
developers' machines are running Ubuntu 15.04
on which sovtins and packages are installed
Answer the question
In order to leave comments, you need to log in
I would recommend you to use (in my opinion) the best utility for working with MySql database - sqlyog . It has an interesting feature - working with the server through an http tunnel (the only php script that needs to be placed on the server is included).
This feature helped me a lot when the admin "forgot" to provide access to the database from my host.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question