How to Install Mysql Database on ubuntu
You can install the mysql database in Linux's ubuntu using the below command in the terminal.
sudo apt-get install mysql-server
Once you execute the command the ubuntu terminal will show like
After this operation, 27.3MB of additional disk space will be used.
Do you want to continue [Y/n]?
At that time press y(yes) and then enter key. Now the download and installation will be start. While installation ubuntu will ask the root username's password.
These are the output will be print after the installation in ubuntu terminal.
vinoth@vinoth:/var/www$ sudo apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libhtml-template-perl mysql-server-5.1 mysql-server-core-5.1
Suggested packages:
libipc-sharedcache-perl tinyca mailx
The following NEW packages will be installed:
libhtml-template-perl mysql-server mysql-server-5.1 mysql-server-core-5.1
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
Need to get 0B/11.9MB of archives.
After this operation, 27.3MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Preconfiguring packages ...
Selecting previously deselected package mysql-server-core-5.1.
(Reading database ... 129705 files and directories currently installed.)
Unpacking mysql-server-core-5.1 (from .../mysql-server-core-5.1_5.1.41-3ubuntu12.10_i386.deb) ...
Selecting previously deselected package mysql-server-5.1.
Unpacking mysql-server-5.1 (from .../mysql-server-5.1_5.1.41-3ubuntu12.10_i386.deb) ...
Selecting previously deselected package libhtml-template-perl.
Unpacking libhtml-template-perl (from .../libhtml-template-perl_2.9-1_all.deb) ...
Selecting previously deselected package mysql-server.
Unpacking mysql-server (from .../mysql-server_5.1.41-3ubuntu12.10_all.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Setting up mysql-server-core-5.1 (5.1.41-3ubuntu12.10) ...
Setting up mysql-server-5.1 (5.1.41-3ubuntu12.10) ...
mysql start/running, process 4447
Setting up libhtml-template-perl (2.9-1) ...
Setting up mysql-server (5.1.41-3ubuntu12.10) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Now mysql database is ready to use,
You can start and stop the ubuntu using the below command.
vinoth@vinoth:/var/www$ sudo /etc/init.d/mysql restart
After you execute the command the following line will show in ubuntu's terminal window.
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 restart(8) utility, e.g. restart mysql
mysql start/running, process 4554
vinoth@vinoth:/var/www$
