
mysql
The major challenge for me as a developer was to make .net applications with mysql database to run in Linux. After all the hicups from past three weeks I want to share what I was able to acheive.
The application will be installed in Windows but the mysql database to be used would be installed in ubuntu linux.
Below are the configuration details about the way to setup connection between ubuntu and windows.
Hope this would be very helpfull for developers.
Install Ubuntu 8.04
MYSQL
Install MySql Database,Gui,Query Browser (using command prompt/synaptic manager/add-remove programs)
Sudo –i
Sudo apt-get mysql-server mysql-client
Install MySql-Connector.
1. Download the mysql-connector-net-version-noinstall.zip and extract the contents to a directory of your choice, for example: ~/connector-net/.
2. In the directory where you unzipped the connector to, change into the bin directory. Ensure the file MySql.Data.dll is present.
3. You must register the Connector/NET component, MySql.Data, in the Global Assembly Cache (GAC). In the current directory enter the gacutil command:
root-shell> gacutil /i MySql.Data.dll
This will register MySql.Data into the GAC. You can check this by listing the contents of /usr/lib/mono/gac, where you will find MySql.Data if the registration has been successful.
Refer: http://dev.mysql.com/doc/refman/5.1/en/connector-net-installation-unix.html
FIREWALL
To enable remote connection
-Firewall on server should not block incoming requests.
-Firewall on client should not block outgoing requests.
GUI FOR FIREWALL SETTINGS IN UBUNTU IS FIRESTARTER.
Install Firestarter
1. From the “Applications” menu, select “Add/Remove”. This will bring up Ubuntu’s applications manager.
2. Select “All available applications” from the “Show” drop-down menu (located in the top-right corner of the applications manager.
3. Type “firestarter” in to the search box (top-left) and press on your keyboard.
4. Click the check box next to “Firestarter” in the top-right pane. You’ll then be asked if you want to install it.
5. Click the “Install” button.
6. Click the “Apply” button.
7. Confirm you want to apply the installation by clicking the “Apply” button.
8. Authenticate. Type in the root password. Now, Firestarter will be downloaded and installed.
OR type in command prompt:
sudo apt-get install firestarter
Refer: http://www.howtoadvice.com/FirestarterInstall/
http://www.howtogeek.com/howto/ubuntu/install-the-firestarter-firewall-on-ubuntu-linux/
TELNET
Install Telnet Service:
Installation can be easily done using synaptic manager or it could be done using command prompt.
$ sudo apt-get install telnetd
Configure telnet server (turn on telnet server)
$ sudo /etc/init.d/inetd restart
Telnet to server (How do I use telnet client?)
You should now be able to telnet to the server from Windows or Linux desktop system. Type the following command to connect to Telnet server:
$ telnet 192.168.1.200
$ telnet server-ip-address
$ telnet ubentu-linux-server-ip
$ telnet ubentu.mydomain.com
Ref: http://www.cyberciti.biz/faq/how-do-i-turn-on-telnet-service-on-for-a-linuxfreebsd-system/
SAMBA SERVER
Installing Samba Server to make remote sharing from windows to linux
Create a share on linux ubuntu server and map this share on hosts.
http://www.howtogeek.com/howto/ubuntu/install-samba-server-on-ubuntu/
https://help.ubuntu.com/community/SettingUpSamba
REMOTE CONNECTION IN MYSQL
MySql settings before doing remote host:
- MySQL Server on server host is not running.
- MySQL Server on server host is running, but has “skip-networking” or
“bind-address=127.0.0.1″ options enabled in its my.cnf file.
- The mySQL DBMS for both the server must use same version.
-Database only uses MyISAM tables, strictly no INNODB please.
Reference:(http://blog.arielon.com/tech/moving-mysql-database-windows-ubuntu-linux-without-mysqldump)
To establish remote connection follow the below link:
• Enable remote connection between the hosts.
• Disable Firewall or enable the port through which connection has to be made between ports
Some Quick References:
http://www.cyberciti.biz/tips/how-do-i-enable-remote-access-to-mysql-database-server.html
http://ubuntuforums.org/archive/index.php/t-716183.html
http://itc.virginia.edu/unixsys/sec/hosts.html
http://camilord.kagayan.com/2009/04/13/visual-c-connecting-to-mysql-remotely/
A simple way is to give the ipaddress in the host column along with username and password in mysql frontend which will guide to the mysql database installed in other system.

MYSQL FRONTEND
Fig: MySql Front-end to take remote access of mysql database in remote host.
By using this procedure we can connect mysql database from windows to windows or linux to windows & vice-versa.
Related posts
- COPY MYSQL DATABASE FROM ONE MYSQL HOST TO ANOTHER MYSQL HOST.
- HOW TO RUN CRYSTAL REPORTS IN UBUNTU LINUX
- Installation guide for Novel’s Mono,Mono-develop,Xsp2 Server in Ubuntu 9.10 Karmic Koala
- Getting Confused to how to make a database connection ? This post will fix your problem
- RUNNING WINDOWS APPLICATION IN UBUNTU
will be useful for me..when I switch over to Ubuntu after quite a while..
thx for your sharing, if you are using mysql, do you need DB management tool ? I am using Navicat to manage my oracle and mysql data.
@Chris You can use Mysql -Query Browser a good DB Management tool in Ubuntu
MySql has its own gui tool which would be helpful to manage data. I dont think it there is any necessity of such tool. But if you have any application which requires such tool you could do so.
thx srikanth!