Hi everyone. I m working on the project "Online Database Server" something like phpmyadmin, I want to provide a web service in php i.e anyone can connect his/her desktop application to my online database how can it will be achieved in php. thanks for the help in advance..
in place of localhost put your IP on the serverspot // we connect to example.com and port 3307 $link = mysql_connect('example.com:3307', 'mysql_user', 'mysql_password'); if (!$link) { die('Could not connect: ' . mysql_error()); } echo 'Connected successfully'; mysql_close($link); PHP: Where example.com your domain is or your IP from your server
Most things will be the same as when you are connecting locally with 2 exceptions: 1. You'll have to set your firewall to allow inbound connections to the MySQL port. 2. You'll need to create a MySQL user (and password) that can connect from any host. You do this with the 'GRANT' command. More info here: http://dev.mysql.com/doc/refman/5.1/en/grant.html
Ya u all got my point thanks for the info but i m not professional plz give me the links of tutorials and some useful places from where i could learn these type of professional services .... I want that anyone make their app say in dot net framework (front end) and for the database purpose he/she use my online database server login into that and create database tables and then every time from front end enter th info and will be connected to online database tables databases are shown just like localhost,........ I think it will be clear hopefully .... thanks in advance..