Results 1 to 9 of 9
  1. #1

    Smile Connecting to MySQL Database


    hello!

    Just wondering if it is same way ba in mysql to establish a connection to DB when the php script is running from a intranet server or localserver but the mySQL database is located in the webserver?

    I mean ang script is running from local server/ intraner server connecting to MySQL DB sa akong web server.

    If incase pwede or same way ra depending lang sa servername, username, password and dbname then I need an Internet connection para maka connect right? how if I have a proxy whenever we connect to internet. I mean that we are using a proxy server connecting to internet. Is it same lang ang pag connect sa mysql to web server or maka connect ba maski naay proxy?

    thanks a lot...

  2. #2
    Inig mysql_connect() nimo bai, instead of localhost kay e enter lang ang kato sa imo usa ka server.

  3. #3
    ah ok. so same lang diay. so I need an internet connection dba para maka connect ko sa mysql DB nako sa webserver? then sa among settings kay naga gamit mi ug proxy whenever we connect to internet. same lang ba gihapon ang pag connect with proxy?

    thanks...

  4. #4
    I think if nag proxy mo sa internet port 80 or 8080 ra na bro, lain man port connect-an sa mySQL. Not sure ha.

  5. #5
    Quote Originally Posted by Dondon View Post
    I think if nag proxy mo sa internet port 80 or 8080 ra na bro, lain man port connect-an sa mySQL. Not sure ha.
    seconded...

    internet connections 80/8080 http proxies rana

    while my sql connects to port 3306 by default..

  6. #6
    ah ok so walay problem with the proxy? maka connect gihapon ko sa mysql DB located on webserver?

  7. #7
    Depende gihapon bro, if open ang port.

    Quote Originally Posted by fixyourself View Post
    seconded...
    Thanks.
    Last edited by Dondon; 02-26-2009 at 11:49 AM.

  8. #8
    depende sad if sa privileges nimo sa db.
    Some mysql dbs that are on hosting services tend to have the default db accounts set to localhost/a certain ip range for security purposes, so kinaglan mu explicitly grant ka privileges. But as I've said this depends on your service provider.

    If your granting privileges sad, I'd suggest you grant to a specific ip. Hopefully naa kay static ip, but if your using a proxy, you might need to set that to your specific proxy. But really, connecting to a mysql server via proxy is very dangerous if you don't know who's proxy it is. And also a GRANT ALL ON *.* TO user@'%' IDENTIFIED BY 'PASSWORD'; is a very bad/dangerous practice as well

  9. #9
    Quote Originally Posted by Anton View Post
    depende sad if sa privileges nimo sa db.
    Some mysql dbs that are on hosting services tend to have the default db accounts set to localhost/a certain ip range for security purposes, so kinaglan mu explicitly grant ka privileges. But as I've said this depends on your service provider.

    If your granting privileges sad, I'd suggest you grant to a specific ip. Hopefully naa kay static ip, but if your using a proxy, you might need to set that to your specific proxy. But really, connecting to a mysql server via proxy is very dangerous if you don't know who's proxy it is. And also a GRANT ALL ON *.* TO user@'%' IDENTIFIED BY 'PASSWORD'; is a very bad/dangerous practice as well
    Nice one. Thanks.

  10.    Advertisement

Similar Threads

 
  1. Replies: 0
    Last Post: 04-13-2010, 08:52 PM
  2. Help: vb6 connect to MySQL
    By sunduwu in forum Programming
    Replies: 0
    Last Post: 03-22-2010, 11:03 AM
  3. help!!!cant connect to mysql database...
    By ingkiang in forum Programming
    Replies: 4
    Last Post: 04-12-2008, 02:17 AM
  4. PHP 5.0 can't connect to MySQL dB
    By ForYou in forum Programming
    Replies: 10
    Last Post: 11-24-2007, 09:25 PM
  5. Replies: 1
    Last Post: 10-04-2006, 09:18 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top