Here is the technical description.

My laptop's config:

  • IP Adress:
  • MySQL Server 5.0 on port 3306
  • Operating System: Ubuntu
  • The database is in this machine

My friend's laptop config:

  • IP Adress:
  • MySQL Server 5.0 on port 3306
  • Operating System: Windows XP

Both are on a wireless LAN connected through a Belkin router ( I put this but its not working:

url = "jdbc:mysql://"

How can I configure things connect to this database?

  • Questions about home networks and personal computers are off-topic per the faq – MDMarra May 31 '12 at 12:59

MySQL is a TCP protocol running on port 3306 by defauly, hence there is nothing special beyond ensure that you have enabled binding to a public IP address in the /etc/my.cnf file;

port            = 3306
bind-address            =

On the client you would need to install the jdbc drivers for MySQL;

For windows XP they can be downloaded from here;

For ubuntu, there are package version in the repository;

# aptitude search mysql | grep JDBC
p   libmysql-java                   - Java database (JDBC) driver for MySQL 

You can use any client, mysql provide a workbence tools product;

or you can use Libreoffice and their database connection to view the tables;

Or use a scripting language like php;

or even just the command line client;

$ mysql -h192.168.2.5 -uuserXXX -e "show databases;"
| Database           |
| information_schema | 
| badger1             | 
| cacti              | 
  • thank you very much for your answer. my friend can access to my database in windows xp but my goal is to access to ** his database in ubuntu**. i have windows xp – waelbk May 31 '12 at 13:03
  • how do you wish to access it?, is the database already running in Ubuntu, or do you need to install it? – Tom May 31 '12 at 13:33
  • 1
    $ mysql -u root -p Enter password: mysql> use mysql mysql> GRANT ALL ON . to root@'' IDENTIFIED BY 'your-root-password'; mysql> FLUSH PRIVILEGES; – waelbk May 31 '12 at 19:23

This might sound stupid but have you checked if your Ubuntu machine has its firewall running? That has tripped me up a few times on both Windows and Linux.

A quick check is to run: sudo iptables -L

Here is a how-to from the ubuntu site: https://help.ubuntu.com/community/IptablesHowTo


Have you configured remote access for your MySQL server ? If not, read this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy