Howto Install Mysql Database Server with Phpmyadmin Frontend

Sponsored Link
MySQL is a widely used and fast SQL database server. It is a client/server implementation that consists of a server daemon (mysqld) and many different client programs/libraries.

Installing Mysql database in Ubuntu

sudo aptitude install mysql-server mysql-client libmysqlclient15-dev

This will complete the installation of mysql server 5.0.45 in ubuntu gutsy.

Configuring Mysql in ubuntu

MySQL initially only allows connections from the localhost (127.0.0.1). We’ll need to remove that restriction if you wish to make it accessible to everyone on the internet. Open the file /etc/mysql/my.cnf

sudo gedit /etc/mysql/my.cnf

Find the line bind-address = 127.0.0.1 and comment it out

#bind-address = 127.0.0.1

You can check your configuration using the following command

#netstat -tap

Output Looks like below

tcp 0 0 *:mysql *:* LISTEN 4997/mysqld

MySQL comes with no root password as default. This is a huge security risk. You’ll need to set one. So that the local computer gets root access as well, you’ll need to set a password for that too. The local-machine-name is the name of the computer you’re working on. For more information see here

sudo mysqladmin -u root password your-new-password

sudo mysqladmin -h root@local-machine-name -u root -p password your-new-password

sudo /etc/init.d/mysql restart

Manage Mysql using Phpmyadmin

phpMyAdmin is a tool written in PHP intended to handle the administration of MySQL over the Web. Currently it can create and drop databases, create/drop/alter tables, delete/edit/add fields, execute any SQL statement, manage keys on fields, manage privileges,export data into various formats and is available in 54 languages. GPL License information.

Install phpmyadmin in ubuntu

sudo aptitude install phpmyadmin

This will complete the installation.

Now you need to goto http://serverip/phpmyadmin/

Login using your mysql root as username and password

Sponsored Link

Incoming search terms:

Related posts

10 thoughts on “Howto Install Mysql Database Server with Phpmyadmin Frontend

  1. Thanks for the tutorial. However, I believe starting with 7.10 Gutsy–and I know for certain in 8.04 Hardy–if you install mysql server using apt-get, you will be prompted to enter a password for the mysql root user during the installation.

    Keep up the excellent work.

    [Reply]

  2. what is server ip?
    please help .
    i cannot set phpmyadmin in browser with this command:
    127.0.0.1/phpmyadmin

    [Reply]

  3. I found that the following steps were also needed to get phpmyadmin working under Apache:

    In a terminal type:

    gksudo gedit /etc/apache2/apache2.conf

    Add:
    Include /etc/phpmyadmin/apache.conf

    and in terminal type:
    sudo /etc/init.d/apache2 restart

    Regards,

    -A.

    [Reply]

  4. On Ubuntu Server 10.04 it’s easier to do:

    ln -s /etc/phpmyadmin/apache.conf /etc/apache2/conf.d/phpmyadmin.conf

    Maybe that works on other ubuntu releases too.
    For this to work, the following line must found at the end of /etc/apache2/apache2.conf:

    # Include generic snippets of statements
    Include /etc/apache2/conf.d/

    [Reply]

  5. Sir,after putting the command “sudo mysqladmin -u root password your-new-password” I am getting an error:
    mysqladmin: connect to server at ‘localhost’ failed
    error: ‘Access denied for user ‘chandan’@’localhost’ (using password: YES)’

    Please guide me to get rid of this problem

    [Reply]

Leave a comment

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