How to Install MySQL Server on Ubuntu 11.10

MySQL ServerMySQL Server is the world’s most popular open source database. MySQL Database powers the most demanding Web, E-commerce and blogging tools. It has multi-threaded, multi-user, fast, robust SQL database server and intended for mission-critical, heavy-load production systems as well as for embedding into mass-deployed software. In this post, i will share on how to install MySQL Server on Ubuntu 11.10 server.

To install MySQL, run the following command on your putty or terminal :

ehowstuff@ehowstuff:~$ sudo apt-get install mysql-server

Example :

ehowstuff@ehowstuff:~$ sudo apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient16 libnet-daemon-perl
  libplrpc-perl mysql-client-5.1 mysql-client-core-5.1 mysql-common mysql-server-5.1
  mysql-server-core-5.1
Suggested packages:
  libipc-sharedcache-perl libterm-readkey-perl tinyca mailx
The following NEW packages will be installed:
  libdbd-mysql-perl libdbi-perl libhtml-template-perl libmysqlclient16 libnet-daemon-perl
  libplrpc-perl mysql-client-5.1 mysql-client-core-5.1 mysql-common mysql-server mysql-server-5.1
  mysql-server-core-5.1
0 upgraded, 12 newly installed, 0 to remove and 79 not upgraded.
Need to get 22.5 MB of archives.
After this operation, 54.5 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://sg.archive.ubuntu.com/ubuntu/ oneiric-updates/main mysql-common all 5.1.62-0ubuntu0.11.10.1 [11.8 kB]
Get:2 http://sg.archive.ubuntu.com/ubuntu/ oneiric/main libnet-daemon-perl all 0.48-1 [43.1 kB]
Get:3 http://sg.archive.ubuntu.com/ubuntu/ oneiric/main libplrpc-perl all 0.2020-2 [36.0 kB]
Get:4 http://sg.archive.ubuntu.com/ubuntu/ oneiric/main libdbi-perl i386 1.616-1build1 [852 kB]
Get:5 http://sg.archive.ubuntu.com/ubuntu/ oneiric-updates/main libmysqlclient16 i386 5.1.62-0ubuntu0.11.10.1 [1,805 kB]
Get:6 http://sg.archive.ubuntu.com/ubuntu/ oneiric/main libdbd-mysql-perl i386 4.019-1 [110 kB]
Get:7 http://sg.archive.ubuntu.com/ubuntu/ oneiric-updates/main mysql-client-core-5.1 i386 5.1.62-0ubuntu0.11.10.1 [88.3 kB]
Get:8 http://sg.archive.ubuntu.com/ubuntu/ oneiric-updates/main mysql-client-5.1 i386 5.1.62-0ubuntu0.11.10.1 [8,602 kB]
Get:9 http://sg.archive.ubuntu.com/ubuntu/ oneiric-updates/main mysql-server-core-5.1 i386 5.1.62-0ubuntu0.11.10.1 [4,632 kB]
Get:10 http://sg.archive.ubuntu.com/ubuntu/ oneiric-updates/main mysql-server-5.1 i386 5.1.62-0ubuntu0.11.10.1 [6,259 kB]
Get:11 http://sg.archive.ubuntu.com/ubuntu/ oneiric/main libhtml-template-perl all 2.10-1 [65.0 kB]
Get:12 http://sg.archive.ubuntu.com/ubuntu/ oneiric-updates/main mysql-server all 5.1.62-0ubuntu0.11.10.1 [6,406 B]
Fetched 22.5 MB in 3min 14s (116 kB/s)
Preconfiguring packages ...
Selecting previously deselected package mysql-common.
(Reading database ... 68437 files and directories currently installed.)
Unpacking mysql-common (from .../mysql-common_5.1.62-0ubuntu0.11.10.1_all.deb) ...
Selecting previously deselected package libnet-daemon-perl.
Unpacking libnet-daemon-perl (from .../libnet-daemon-perl_0.48-1_all.deb) ...
Selecting previously deselected package libplrpc-perl.
Unpacking libplrpc-perl (from .../libplrpc-perl_0.2020-2_all.deb) ...
Selecting previously deselected package libdbi-perl.
Unpacking libdbi-perl (from .../libdbi-perl_1.616-1build1_i386.deb) ...
Selecting previously deselected package libmysqlclient16.
Unpacking libmysqlclient16 (from .../libmysqlclient16_5.1.62-0ubuntu0.11.10.1_i386.deb) ...
Selecting previously deselected package libdbd-mysql-perl.
Unpacking libdbd-mysql-perl (from .../libdbd-mysql-perl_4.019-1_i386.deb) ...
Selecting previously deselected package mysql-client-core-5.1.
Unpacking mysql-client-core-5.1 (from .../mysql-client-core-5.1_5.1.62-0ubuntu0.11.10.1_i386.deb) ...
Selecting previously deselected package mysql-client-5.1.
Unpacking mysql-client-5.1 (from .../mysql-client-5.1_5.1.62-0ubuntu0.11.10.1_i386.deb) ...
Selecting previously deselected package mysql-server-core-5.1.
Unpacking mysql-server-core-5.1 (from .../mysql-server-core-5.1_5.1.62-0ubuntu0.11.10.1_i386.deb) ...
Processing triggers for man-db ...
Setting up mysql-common (5.1.62-0ubuntu0.11.10.1) ...
Selecting previously deselected package mysql-server-5.1.
(Reading database ... 68814 files and directories currently installed.)
Unpacking mysql-server-5.1 (from .../mysql-server-5.1_5.1.62-0ubuntu0.11.10.1_i386.deb) ...
Selecting previously deselected package libhtml-template-perl.
Unpacking libhtml-template-perl (from .../libhtml-template-perl_2.10-1_all.deb) ...
Selecting previously deselected package mysql-server.
Unpacking mysql-server (from .../mysql-server_5.1.62-0ubuntu0.11.10.1_all.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Setting up libnet-daemon-perl (0.48-1) ...
Setting up libplrpc-perl (0.2020-2) ...
Setting up libdbi-perl (1.616-1build1) ...
Setting up libmysqlclient16 (5.1.62-0ubuntu0.11.10.1) ...
Setting up libdbd-mysql-perl (4.019-1) ...
Setting up mysql-client-core-5.1 (5.1.62-0ubuntu0.11.10.1) ...
Setting up mysql-client-5.1 (5.1.62-0ubuntu0.11.10.1) ...
Setting up mysql-server-core-5.1 (5.1.62-0ubuntu0.11.10.1) ...
Setting up mysql-server-5.1 (5.1.62-0ubuntu0.11.10.1) ...
mysql start/running, process 2687
Setting up libhtml-template-perl (2.10-1) ...
Setting up mysql-server (5.1.62-0ubuntu0.11.10.1) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place

Enter Password
MySQL
Re-Enter the password for verification
MySQL

See also  Setup vsftpd Service on CentOS 6.5

Once the installation is complete, the MySQL server should be started automatically. Check MySQL service :

ehowstuff@ehowstuff:~$ sudo netstat -tap | grep mysql
[sudo] password for ehowstuff:
tcp        0      0 localhost:mysql         *:*                     LISTEN      2687/mysqld
ehowstuff@ehowstuff:~$

If the server is not running correctly, run this command to restart the MySQL database :

ehowstuff@ehowstuff:~$ sudo /etc/init.d/mysql restart

Example :

ehowstuff@ehowstuff:~$ sudo /etc/init.d/mysql restart
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service mysql restart

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the stop(8) and then start(8) utilities,
e.g. stop mysql ; start mysql. The restart(8) utility is also available.
mysql stop/waiting
mysql start/running, process 2853

Configure MySQL to listen for connections from allowed network, simply change the following to ip :

ehowstuff@ehowstuff:~$ sudo vi /etc/mysql/my.cnf
bind-address            = 192.168.1.0

Restart the MySQL database :

ehowstuff@ehowstuff:~$ sudo /etc/init.d/mysql restart

Example :

ehowstuff@ehowstuff:~$ sudo /etc/init.d/mysql restart
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service mysql restart

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the stop(8) and then start(8) utilities,
e.g. stop mysql ; start mysql. The restart(8) utility is also available.
mysql stop/waiting
mysql start/running, process 2968

How to Reset the Directory Manager Password on RHEL 7 / CentOS 7
How to Reset the Directory Manager Password on RHEL 7 / CentOS 7

It is best practice to remember passwords, but because too many passwords, sometimes we forget. We are not encouraged to write the password on any paper or share the password...

How to Find Big Files Size on Linux RHEL/CentOS
How to Find Big Files Size on Linux RHEL/CentOS

As the linux administrator, sometimes we have to identify which files are most take much space in the linux server resulting in low free space. Low disk space can also...

Why Linux users should worry about malware and what they can do about it
Why Linux users should worry about malware and what they can do about it

Don’t drop your guard just because you’re running Linux. Preventing the spread of malware and/or dealing with the consequences of infection are a fact of life when using computers. If...

How to Reset Forgotten Root Password on Linux RHEL 7 / CentOS 7
How to Reset Forgotten Root Password on Linux RHEL 7 / CentOS 7

This short howto will explain the steps to reset a lost root password or to reset a forgotten root password on Linux RHEL 7 or CentOS 7. Basically, we will...

How to Update CentOS or Upgrade CentOS to the Latest Version
How to Update CentOS or Upgrade CentOS to the Latest Version

Recently, the latest version of CentOS 7.3 was released. All users of CentOS 7.0, 7.1 and 7.2 can upgrade their system to the most recent. This quick guide will explain...

How to Change your WordPress Username, Nickname and Display Name in MySQL
How to Change your WordPress Username, Nickname and Display Name in MySQL

After you create an account log in WordPress, you may want to change your WordPress username, as appropriate or due to security reason. However, you can not do this from...

How to Enable SSH Root Login on Ubuntu 16.04
How to Enable SSH Root Login on Ubuntu 16.04

As what we wrote in the previous article on how to allow SSH root on Ubuntu 14.04, after installing a fresh new copy of Ubuntu 16.04 LTS, we find that...

How to Change UUID of Linux Partition on CentOS 7
How to Change UUID of Linux Partition on CentOS 7

UUID (Universally Unique IDentifier) should be unique and it is used to identify storage devices on a linux system. If you cloned a virtual machine from vCenter, the metadata containing...

Leave a Reply

Your email address will not be published. Required fields are marked *