PHP mysql_connect

Discussion in 'Databases' started by RyeGuy, Feb 13, 2010.

  1. I am trying to set up phplist on my web site. I keep getting a database connection error. I can successfully connect to db using asp.net code, as well as sql server manager. So I tested the code used to open database in a simple php page and get the following error

    ********************************
    Warning: mysql_connect() [function.mysql-connect]: Unknown MySQL server host 'tcp' (11004) in E:\web\thegwaac\lists\test2.php on line 2
    Could not connect: Unknown MySQL server host 'tcp' (11004)
    ********************************

    Here is code:

    ********************************
    <?php
    $link = mysql_connect('tcp:s01.Winhost.com', 'DB_XXXX_database_user', '*****');
    if (!$link) {
    die('Could not connect: ' . mysql_error());
    }
    echo 'Connected successfully';
    mysql_close($link);

    ?>
    ********************************
     
    Last edited by a moderator: Oct 14, 2015
  2. s01.Winhost.com is not a MySQL server, it's an MS SQL server. We do not offer MySQL.
     
    Last edited: Oct 14, 2015
  3. Ray

    Ray

    Last edited by a moderator: Oct 14, 2015

Share This Page