Howto install Mysql server on Ubuntu 12 or Debian

Howto install Mysql server on Ubuntu 12 or Debian

 

1. Install mysql server on Ubuntu

ubuntu@ip:/etc$ 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 libmysqlclient18 libnet-daemon-perl libplrpc-perl mysql-client-5.5 mysql-client-core-5.5 mysql-common mysql-server-5.5 mysql-server-core-5.5
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 libmysqlclient18 libnet-daemon-perl libplrpc-perl mysql-client-5.5 mysql-client-core-5.5 mysql-common mysql-server mysql-server-5.5
mysql-server-core-5.5
0 upgraded, 12 newly installed, 0 to remove and 83 not upgraded.
Need to get 27.2 MB of archives.
After this operation, 97.2 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://archive.ubuntu.com/ubuntu/ precise-updates/main mysql-common all 5.5.29-0ubuntu0.12.04.1 [13.5 kB]
Get:2 http://archive.ubuntu.com/ubuntu/ precise-updates/main libmysqlclient18 amd64 5.5.29-0ubuntu0.12.04.1 [946 kB]
Get:3 http://archive.ubuntu.com/ubuntu/ precise/main libnet-daemon-perl all 0.48-1 [43.1 kB]
Get:4 http://archive.ubuntu.com/ubuntu/ precise/main libplrpc-perl all 0.2020-2 [36.0 kB]
Get:5 http://archive.ubuntu.com/ubuntu/ precise/main libdbi-perl amd64 1.616-1build2 [849 kB]
Get:6 http://archive.ubuntu.com/ubuntu/ precise/main libdbd-mysql-perl amd64 4.020-1build2 [106 kB]
Get:7 http://archive.ubuntu.com/ubuntu/ precise-updates/main mysql-client-core-5.5 amd64 5.5.29-0ubuntu0.12.04.1 [1,932 kB]
Get:8 http://archive.ubuntu.com/ubuntu/ precise-updates/main mysql-client-5.5 amd64 5.5.29-0ubuntu0.12.04.1 [8,323 kB]
Get:9 http://archive.ubuntu.com/ubuntu/ precise-updates/main mysql-server-core-5.5 amd64 5.5.29-0ubuntu0.12.04.1 [6,055 kB]
Get:10 http://archive.ubuntu.com/ubuntu/ precise-updates/main mysql-server-5.5 amd64 5.5.29-0ubuntu0.12.04.1 [8,832 kB]
Get:11 http://archive.ubuntu.com/ubuntu/ precise/main libhtml-template-perl all 2.10-1 [65.0 kB]
Get:12 http://archive.ubuntu.com/ubuntu/ precise-updates/main mysql-server all 5.5.29-0ubuntu0.12.04.1 [11.7 kB]
Fetched 27.2 MB in 3s (6,917 kB/s)
Preconfiguring packages …
Selecting previously unselected package mysql-common.
(Reading database … 25765 files and directories currently installed.)
Unpacking mysql-common (from …/mysql-common_5.5.29-0ubuntu0.12.04.1_all.deb) …
Selecting previously unselected package libmysqlclient18.
Unpacking libmysqlclient18 (from …/libmysqlclient18_5.5.29-0ubuntu0.12.04.1_amd64.deb) …
Selecting previously unselected package libnet-daemon-perl.
Unpacking libnet-daemon-perl (from …/libnet-daemon-perl_0.48-1_all.deb) …
Selecting previously unselected package libplrpc-perl.
Unpacking libplrpc-perl (from …/libplrpc-perl_0.2020-2_all.deb) …
Selecting previously unselected package libdbi-perl.
Unpacking libdbi-perl (from …/libdbi-perl_1.616-1build2_amd64.deb) …
Selecting previously unselected package libdbd-mysql-perl.
Unpacking libdbd-mysql-perl (from …/libdbd-mysql-perl_4.020-1build2_amd64.deb) …
Selecting previously unselected package mysql-client-core-5.5.
Unpacking mysql-client-core-5.5 (from …/mysql-client-core-5.5_5.5.29-0ubuntu0.12.04.1_amd64.deb) …
Selecting previously unselected package mysql-client-5.5.
Unpacking mysql-client-5.5 (from …/mysql-client-5.5_5.5.29-0ubuntu0.12.04.1_amd64.deb) …
Selecting previously unselected package mysql-server-core-5.5.
Unpacking mysql-server-core-5.5 (from …/mysql-server-core-5.5_5.5.29-0ubuntu0.12.04.1_amd64.deb) …
Processing triggers for man-db …
Setting up mysql-common (5.5.29-0ubuntu0.12.04.1) …
Selecting previously unselected package mysql-server-5.5.
(Reading database … 26131 files and directories currently installed.)
Unpacking mysql-server-5.5 (from …/mysql-server-5.5_5.5.29-0ubuntu0.12.04.1_amd64.deb) …
Selecting previously unselected package libhtml-template-perl.
Unpacking libhtml-template-perl (from …/libhtml-template-perl_2.10-1_all.deb) …
Selecting previously unselected package mysql-server.
Unpacking mysql-server (from …/mysql-server_5.5.29-0ubuntu0.12.04.1_all.deb) …
Processing triggers for man-db …
Processing triggers for ureadahead …
Setting up libmysqlclient18 (5.5.29-0ubuntu0.12.04.1) …
Setting up libnet-daemon-perl (0.48-1) …
Setting up libplrpc-perl (0.2020-2) …
Setting up libdbi-perl (1.616-1build2) …
Setting up libdbd-mysql-perl (4.020-1build2) …
Setting up mysql-client-core-5.5 (5.5.29-0ubuntu0.12.04.1) …
Setting up mysql-client-5.5 (5.5.29-0ubuntu0.12.04.1) …
Setting up mysql-server-core-5.5 (5.5.29-0ubuntu0.12.04.1) …
Setting up mysql-server-5.5 (5.5.29-0ubuntu0.12.04.1) …
130131 16:58:22 [Note] Plugin ‘FEDERATED’ is disabled.
130131 16:58:22 InnoDB: The InnoDB memory heap is disabled
130131 16:58:22 InnoDB: Mutexes and rw_locks use GCC atomic builtins
130131 16:58:22 InnoDB: Compressed tables use zlib 1.2.3.4
130131 16:58:22 InnoDB: Initializing buffer pool, size = 128.0M
130131 16:58:22 InnoDB: Completed initialization of buffer pool
130131 16:58:22 InnoDB: highest supported file format is Barracuda.
130131 16:58:22 InnoDB: Waiting for the background threads to start
130131 16:58:23 InnoDB: 1.1.8 started; log sequence number 1595675
130131 16:58:23 InnoDB: Starting shutdown…
130131 16:58:24 InnoDB: Shutdown completed; log sequence number 1595675
mysql start/running, process 5270
Setting up libhtml-template-perl (2.10-1) …
Setting up mysql-server (5.5.29-0ubuntu0.12.04.1) …
Processing triggers for libc-bin …
ldconfig deferred processing now taking place
ubuntu@ip:/etc$

2. Access mysql and show datababase

ubuntu@ip-/$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 43
Server version: 5.5.29-0ubuntu0.12.04.1 (Ubuntu)Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.mysql>

mysql> show databases;
+——————–+
| Database |
+——————–+
| information_schema |
| mysql |
| performance_schema |
| test |
+——————–+
4 rows in set (0.00 sec)

mysql>

That’s all. Thanks for using IThelpblog.com.

Tags:  

Leave a reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>