1. No Profile Picture
    Devshed Newbie (0 - 499 posts)

    just installed apache and php on a win95 machine.
    and now i'm trying to configure mysql but i'm
    quit stuck in here.

    i'm using
    as reference.

    php3 script :
    <head><title>test db</title>
    $sql = new MySQL_class;

    echo("Database connection successful.n");

    util.php3 would be to long to past but if nessecary
    it's at this link :
    it used as user jo and as password joa.

    apache and the mysqld deamon is running.

    php3.ini has been adapted as following :

    ;Windows Extensions

    mysql.default_port = ;
    mysql.default_host =;
    mysql.default_user =jo;
    mysql.default_password =joa;

    now running testdb.php3 keeps giving me
    Error: Unable to connect to MySQL server: : '' :


    mysql -u root
    i've added a superuser like this:

    do_command: query: INSERT INTO user VALUES ('%', 'jo',
    password('joa'), 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y')
    mysqladmin reload -uroot

    then : mysql -ujo -pjoa
    ok logged in

    and typed in the rest of the tutorial.

    btw : logging in as root and doing
    a query like select * from user outputs
    what it should.

    If anyone has any idea where my config problem should locate I would love to hear it.

    Greetings Joachim
  2. #2
  3. No Profile Picture
    Devshed Newbie (0 - 499 posts)
    I would try accessing the database like this:

    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
    mysql_connect("","user","pass") or die("Connection failed.");
    echo "Connection successful.";

    If that works then it is probably a problem with the database class in util.php3.

  4. #3
  5. No Profile Picture
    Devshed Newbie (0 - 499 posts)
    unfortunatly it doesn't work.
    If anybody has any ideas left...

    Greetings Joachim
  6. #4
  7. No Profile Picture
    Devshed Newbie (0 - 499 posts)
    Does PHP return an error message when you try to connect to MySQL?


Similar Threads

  1. Can not connect to MySQL - urgent help required.
    By Husain in forum MySQL Help
    Replies: 17
    Last Post: April 5th, 2004, 10:39 PM
  2. Can't connect to MySQL server on '24.*.*.*'
    By zytariuk in forum MySQL Help
    Replies: 9
    Last Post: May 1st, 2002, 07:30 AM
  3. Can't use php to connect mysql
    By itsource in forum PHP Development
    Replies: 8
    Last Post: January 23rd, 2002, 02:16 AM
  4. No idea on how to connect to mySQL, please help
    By darthmahon in forum MySQL Help
    Replies: 1
    Last Post: January 7th, 2002, 06:31 AM
  5. MyODBC & Win98 / MySQL & RH 7.1: can't connect!!
    By jeffdking99 in forum MySQL Help
    Replies: 9
    Last Post: December 26th, 2001, 07:17 PM

IMN logo majestic logo threadwatch logo seochat tools logo