Search this site

Showing posts with label MySQL. Show all posts
Showing posts with label MySQL. Show all posts

Sunday, February 3, 2019

MySQL in ubuntu 18.04 (update)

It was a long time ago, I make a post (or my personal note) about how to install MySQL in ubuntu
and it seems now, the version and how to install is already changed so I make this post.

previous post here

Step:
0. apt get update (start with this)
sudo apt-get update
1. Installing MySQL
sudo apt-get install mysql-server
1.1. mysql secure installation (optional but recommended)
sudo mysql_secure_installation
2. Installing apache2
sudo apt-get install apache2
3. Installing phpmyadmin
sudo apt-get install phpmyadmin
4. connect apache2 and phpmyadmin
sudo ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
5. activate it
sudo a2enconf phpmyadmin.conf
6. restart apache
sudo systemctl reload apache2.service

ok done

Sunday, January 26, 2014

Installing apache, PHP5, and MySQL in ubuntu

Well, this blog will be my own note for something like this.
I hope this also help someone who still don't know how to install it.

Step:
1. sudo su (must be root)
2. Installing MySQL

  • apt-get install mysql-server mysql-client
  • To check: type mysql in terminal

3. Installing Apache2

  • apt-get install apache2
  • To check: go to your browser and open your IP for example localhost (if you using xampp) or http://192.168.0.100 
  • Apache's default document root is /var/www on Ubuntu, and the configuration file is /etc/apache2/apache2.conf. Additional configurations are stored in subdirectories of the/etc/apache2 directory such as /etc/apache2/mods-enabled (for Apache modules), /etc/apache2/sites-enabled (for virtual hosts), and /etc/apache2/conf.d. 

4. Installing PHP5

  • apt-get install php5 libapache2-mod-php5
  • After that restart apache
  • /etc/init.d/apache2 restart 
  • To check: go to /var/www and make info.php like this

phpinfo();
?>

  •  And open it with your browser IP/info.php or http://192.168.0.100/info.php

5. MySQL support PHP5

  • we need MySQL for PHP5 support
  • apt-cache search php5
  • pick anything you need
  • apt-get install php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
  • After that restart apache again
  • /etc/init.d/apache2 restart
  • To check: reopen info.php and it will show some new module

6. Install phpmyadmin

  • to help us to manage mysql
  • apt-get install phpmyadmin
  • To check: go to your browser, open your IP/phpmyadmin or http://192.168.0.100/phpmyadmin

Source: link