Ubuntu mysql install

You can check whether mysql has been installed in Ubuntu system with the ps command or dpkg command to check the installed package.

Check mysql daemon using ps command:


luzar@ubuntu:~$ ps aux | grep mysql
root 4078 0.0 0.1 1772 524 ? S 05:19 0:00 /bin/sh /usr/bin/mysqld_safe
mysql 4120 0.0 3.1 127088 16312 ? Sl 05:19 0:01 /usr/sbin/mysqld
--basedir=/usr --datadir=/var/lib/mysql --user=mysql
--pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking
--port=3306 --socket=/var/run/mysqld/mysqld.sock
root 4122 0.0 0.1 1700 556 ? S 05:19 0:00 logger -p
daemon.err -t mysqld_safe -i -t mysqld
luzar 4775 0.0 0.1 3004 752 pts/0 R+ 07:51 0:00 grep mysql
luzar@ubuntu:~$


Check mysql package using dpkg command:


luzar@ubuntu:~$ dpkg -l | grep mysql
ii libdbd-mysql-perl 4.005-1 A Perl5 database interface to the
MySQL data
ii libmysqlclient15off 5.0.51a-3ubuntu5.1 MySQL database client library
ii mysql-client-5.0 5.0.51a-3ubuntu5.1 MySQL database client binaries
ii mysql-common 5.0.51a-3ubuntu5.1 MySQL database common files
ii mysql-server 5.0.51a-3ubuntu5.1 MySQL database server
(meta package dependin
ii mysql-server-5.0 5.0.51a-3ubuntu5.1 MySQL database server binaries
ii php5-mysql 5.2.4-2ubuntu5.1 MySQL module for php5
luzar@ubuntu:~$


So I already have mysql installed during installation. If you don't have mysql in your Ubuntu server, you can install it using apt-get command. If you already configured your Internet connection, then issue the apt-get command like in the example below:


luzar@ubuntu:~$ apt-get install mysql-server-5.0


The apt-get tool will ask you to confirm the mysql installation, and you need to answer Y (yes).

That's all you need to do to have mysql installed in your Ubuntu system.