X

How To Install Mysql, PHP Server on Ubuntu 14.04

MySQL is a linux based open-source database management system. It’s a popular database management system on linux. It uses relational database management system and SQL (Structured Query Language). It can install easy process on ubuntu 14.04 or ubuntu 16.04.

How To Install mysql Community on Windows 10
How To Setup Mysql Master Slave Replication on Ubuntu 14.04

Step #01:  Now Change your machine hostname e.g mysql-server or another.

Open hosts file via vim editor

root@mysql:~#  vim /etc/hosts

Press Esc  type :wq then press enter.

Step #02: Configure static ip addres on your linux machine.

root@mysql:~# vim /etc/network/interface

Before:

auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp

After:

auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
        address 20.11.10.10
        netmask 255.255.0.0
        gateway 20.11.1.1
        dns-nameservers 20.11.10.1

Step #03: Ubuntu update & upgrade command

root@mysql:~#  apt-get update && apt-get upgrade

Step #04: Install mysql server via apt-get installer

root@mysql:~# apt-get install mysql-server

Show popup message for configure mysql root password as like below:

Completed installation process about few minutes.

Step #05: Login mysql via root user

root@mysql:~#  mysql -u root -p

Then type your mysql password

Show as like below system for create database, delete database, create table, delete table, show database, show tables and more functionality.

Step #06: Create a new MySQL database

mysql> create database testdb;

Step #07: Create a new MySQL user with password

mysql> CREATE USER ‘newuser‘@’localhost’ IDENTIFIED BY ‘password‘;

Step #08: Using flush privileges for change update tables, database and user.

mysql> flush privileges;

Then exit command for leave mysql.

Step #09: Install php on ubuntu 14.04.

root@mysql:~# apt-get install php5 libapache2-mod-php5 php5-mcrypt php5-cli php5-xsl php5-intl libcurl3 php5-curl php5-gd mcrypt

Then goto /var/www/html/ create one php file for check php script run your server.

root@mysql :~# cd /var/www/html

vi index.php

Insert below text into index.php file.

<?php phpinfo () ; ?>

If face any problem then see my YouTube video and Subscribe my channel. Please subscribe my channel for more update.

Admin: I am system administrator as Windows and Linux platform. I have 4 years skilled from the professional period. I have to configure Linux based system such as an Asterisk VOIP system, Network monitoring tools (ZABBIX), Virtualization (XEN Server), Cloud computing (Apache CloudStack) etc. Now share my professional skill each interested person. Thanks to all.
Leave a Comment