Tech-Today
Setup MySQL Database for Remote Access
Here are some useful guidelines in setting up a mysql server for remote access in Ubuntu.
- Install and configure mysql server.
sudo apt-get update
sudo apt-get install mysql-server
mysql_secure_installation
*Note in MySQL - it will ask to set the password but not in MariaDB - Bind MySQL to the public IP where it is hosted by editing the file MySQL: /etc/conf/my.cnf or MariaDB: /etc/mysql/mariadb.conf.d/50-server.conf, the cnf file is sometimes pointing to another file - make sure to check that. Search for the line with "bind-address" string. Set the value to your IP address or comment the bind-address line.
- Make sure that your user has enough privilege to access the database remotely:
create user 'lacus'@'localhost' identified by 'lacus';
grant all privileges on *.* to 'lacus'@'localhost' <with grant option>;
create user 'lacus'@'%' identified by 'lacus';
grant all privileges on *.* to 'lacus'@'%' <with grant option>;
- Open port: 3306 in the firewall:
sudo ufw allow 3306/tcp
sudo service ufw restart
-
How To Install Mysql In Ubuntu 16.04
The following commands allow us to install a MySQL server on Ubuntu 16.04, create a database, user and table. And finally, tune the server. # install mysql sudo apt-get update sudo apt-get upgrade sudo apt-get install mysql-server sudo mysql_secure_installation...
-
How To Install Apache2 Php5 And Mysql5 In Ubuntu 12.04
These are the set of scripts I executed in ubuntu to install the ff: 1.) apache2 2.) php5 3.) mysql5 >sudo apt-get install apache2 //installs in /etc/apache2 >sudo apt-get install php5 //installs in /etc/php5 >sudo apt-get install libapache2-mod-php5...
-
How To Setup A Dns Server On Ubuntu 12.04
This tutorial will help you in setting up a dns gateway in your ubuntu machine (I'm using 12.04 version, not sure if this would work on others). First we need to install bind9, which is a dns server: sudo apt-get install bind9 Open /etc/bind/named.conf.local...
-
How To Install Subversion And Websvn On Ubuntu 12.04
This write-up contains a set of instruction on how to install and configure svn as well as setup websvn on an ubuntu 12.04 machine. 1.) Install subversion and apache2 sudo apt-get install subversion sudo apt-get install apache2 sudo apt-get install libapache2-svn...
-
Change Postgresql's Postgres Password
This is how you would change your postgresql's user postgres password, in case you forgot it. This is done in ubuntu 12.04. 1.) Logon to your postgres account in behalf of root: >sudo -u postgres psql template1 //enter your password Now you're...
Tech-Today