When coding, we often install a MySql server on our development computer. That does not reflect a real production environment in which the database sits on a dedicated server. Here we will install MySql on a Debian Server.
What do we need before installation ? A Debian Server, and of course our development machine.
Connect to your Debian Server (with putty on Windows for instance or directly on your server) and issue the command :
Type Y(es) to confirm installation, and after a while the MySql configuration launches and asks for the root password.
By default, MySql only accepts connexions from localhost, and not from outside. We will have to allow incoming connexions to our dedicated Server. We have to modify the following file under Debian : /etc/mysql/my.cnf
With nano, we had a sharp before the line bind-address to comment it.
We, now have, to grant access to our root account from a distant computer. For this we connect to Mysql CLI with :
grant all privileges on *.* to root@’%’ identified by « password« ;
Congratulations, You’re done ! You have a dédicated Mysql Server running on your Debian box…
Please leave a comment if you found this post useful. Thanks.