Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2004
    Posts
    2

    Unanswered: Can't connect to MySQL server on 'myserver' (146)

    Does anyone know how to fix this error?

    My php code is:

    @ $db = mysql_connect("myserver", "admin", "admin") or die (mysql_error());
    mysql_select_db("mydb") or die (mysql_error()); ;

    I'm using MySQL version 4.5.1-gamma-pro

    Thanks in advance.
    Last edited by helios1; 10-27-04 at 18:14.

  2. #2
    Join Date
    Sep 2004
    Posts
    46
    this functions must have 2 arguments:
    mysql_select_db("mydb",$db) or die (mysql_error());

  3. #3
    Join Date
    Oct 2004
    Posts
    2
    Actually, my code was just fine. PHP wouldn't work unless it was on the same server as MySQL. I thought there was a way to point to the correct server.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •