a Simple Question About My Sql and Sql

Discussion in 'Programming' started by great_friend, Sep 27, 2007.

  1. #1
    i Want To Create a Application in which all my files is in cd and i want to to run this cd at many Places thats my i want to upload mt MSSQL/MYSQL database in hosting of my company website but the problem is thats What type of connection string i have to write in my page

    Company Website:
    http://www.companywebsite.com

    Company webhosting ip:
    92.7.252.116

    in php:
    <?
    $db = mysql_connect("????????", "usernmae","password");
    mysql_select_db("db",$db);
    ?>

    In Asp:

    strCon = DRIVER={MySQL ODBC 3.51 Driver}; SERVER=???????; DATABASE=db; UID=username; Password=pasword; OPTION=3

    Please Edit in "????????" this place
     
    great_friend, Sep 27, 2007 IP
  2. sohointernet

    sohointernet Peon

    Messages:
    15
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    My first thought is that you should be using the IP address as the server parameter like:

    <?
    $db = mysql_connect("92.7.252.116", "username","password");
    mysql_select_db("db",$db);
    ?>


    Have you tried that? If so, does it work or is there an error? Have you set your MySQL server privileges up so that they allow access from the IP addresses of the places where you are sending the CD?


    Gary
     
    sohointernet, Sep 28, 2007 IP
  3. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #3
    ask your webhost - many dont allow remote connections to their db's
     
    AstarothSolutions, Sep 29, 2007 IP