This blog is subject the DISCLAIMER below.

Friday, August 24, 2007

MySQL Server on Ubuntu 6.06 Server and Client on Ubuntu 7.04 Desktop Setup & Configuration For Remote Access

Hello Linux & MySQL users :), this is my first article here, and hope it's useful! Here's the scenario I'm trying to achieve: Using VMWare, I set 2 images up, one containing Ubuntu Server 6.06 and MySQL Server, and the other containing Ubuntu Desktop 7.04 and MySQL Client tools, and I wanted to access the server remotely (on the same LAN). Note: you can do the same using 2 separate machines on the same LAN, it's not different at all. Ubuntu Server doesn't have a Desktop Manager by default and I used the command line to achieve everything (I set an X-Server and a desktop manager called Icewm up later using this tutorial: )

  • MySQL Server

    1. Create a root account password: sudo passwd

    2. login with your root account: su

    3. if you didn't set a LAMP (Linux, Apache, MySQL, PHP/Python...etc) server, you can download the mysql-server:
      sudo apt-get update
      sudo apt-get install mysql-server

    1. create the root account on mysql-server: mysqladmin -u root password 'yourpassword'

    2. login to mysql using the root account: mysql -p

    3. create an administrator account that has all privileges of root, e.g.

        GRANT ALL ON *.* TO aamr@'%' IDENTIFIED BY 'yourpassword'

    4. exit from mysql: exit

    5. Edit the configuration file of MySQL (/etc/mysql/my.cnf ) to enable remote access to it using any text editor such as vi: vi /etc/mysql/my.cnf

    6. go to the line “bind-address”, press INSERT and change the IP to the IP of the server, e.g. From to

    7. After you complete editing, press Escape, then type :w to save and :q to quit

  • MySQL Client

    1. You can use the Synaptic package manager in System->Administration and search for mysql-client, mysql-query-browser, and mysql-admin and install them.

    2. Launch any of both, enter the username and password of the user you created, and there you go :)

No comments: