Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10
  1. #1
    New Coder
    Join Date
    Mar 2004
    Location
    CAMBODIA
    Posts
    59
    Thanks
    0
    Thanked 0 Times in 0 Posts

    MySQL connection

    Hi all,

    I just install PHP5 and MySQL5. They all work but I can't connect to MySQL via php connection (mysql_connect).

    Could you tell me what is the matter?

    Thanks for your answer.

    Dweedly
    -= Dweed-Ly =-

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    I left my crystal ball at the office. Can you give us the error message PHP is giving you at least?

  • #3
    New Coder
    Join Date
    Mar 2004
    Location
    CAMBODIA
    Posts
    59
    Thanks
    0
    Thanked 0 Times in 0 Posts
    First thanks for your answer.

    The massage error is :

    Fatal error: Call to undefined function mysql_connect()
    -= Dweed-Ly =-

  • #4
    Senior Coder
    Join Date
    Sep 2005
    Posts
    1,791
    Thanks
    5
    Thanked 36 Times in 35 Posts
    you need to install the php mysql extension:
    http://php.net/mysql

  • #5
    New Coder
    Join Date
    Mar 2004
    Location
    CAMBODIA
    Posts
    59
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm going to check again, but I'm sure I'm already do that.
    -= Dweed-Ly =-

  • #6
    New Coder
    Join Date
    Mar 2004
    Location
    CAMBODIA
    Posts
    59
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have checked and do all the necessary steps to connect MySQL server, but I still can't connect to MySQL with my Windows XP Home edition. But with my windows XP professional, I can connect to MySQL server. I don't understand why.

    I hope you can help me.

    Thanks for your answer.

    Dweedly
    -= Dweed-Ly =-

  • #7
    Super Moderator guelphdad's Avatar
    Join Date
    Mar 2006
    Location
    St. Catharines, Ontario Canada
    Posts
    2,633
    Thanks
    4
    Thanked 148 Times in 139 Posts
    Check out this article and make sure you have followed the proper steps for installation. I installed recently using it and had no problems. in the past I've had many difficulties with installation so at least you know you aren't alone in that regard.

  • #8
    New Coder
    Join Date
    Mar 2004
    Location
    CAMBODIA
    Posts
    59
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I would like to thank you for your article, it is interesting and it work too, now I can explorer more about MySQL. Maybe I'll have some more questions to ask you.

    Dweedly
    -= Dweed-Ly =-

  • #9
    Regular Coder DELOCH's Avatar
    Join Date
    Apr 2006
    Location
    Canada
    Posts
    537
    Thanks
    4
    Thanked 2 Times in 2 Posts
    Until you post your code, we are unable to help you,

    but i had a problem in connecting at first because i thought mysql dbs were like mdb databases and were located in an area awaiting for connection.

    wrong, they are located at the same place, http://localhost/ with the username 'root'

    for you to explore further please install SQLYog from www.sqlyog.com

  • #10
    Mega-ultimate member
    Join Date
    Jun 2002
    Location
    Winona, MN - The land of 10,000 lakes
    Posts
    1,855
    Thanks
    1
    Thanked 45 Times in 42 Posts
    What does PHP info tell you? Create a file named phpinfo.php that contains...

    PHP Code:
    <?php
    phpinfo
    ();
    ?>
    and place it in your webroot. Then go to: http://localhost/phpinfo.php

    You should see a block of configuration options under a mysql heading like mysql.connect_timeout etc.

    If you don't see that, then you don't have the php libs installed.


  •  

    Posting Permissions

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