SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    May 2001
    Location
    Dallas Texas
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Error: Unable to connect to MySQL server: : '' :

    I get this error when I try to access the mysql database. I installed mysql and php both from source on a redhat 7 machine. I have tested both mysql and php, they seem to work fine after testing them. When I list processes they are both running... If mysql_safe is running, does that mean I am in safe mode? Do I need to specify a user in the php.ini? When I install mysql and php from source does the user "nobody" that php uses get created or do I have to create it using mysqladmin?

    I almost have this web running... can antone give me advice?

    Thanks
    Jeff Pace

  2. #2
    Grumpy Mole Man Skunk's Avatar
    Join Date
    Jan 2001
    Location
    Lawrence, Kansas
    Posts
    2,066
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you set up an account on your mySQL database with a username and password yet?

  3. #3
    SitePoint Member
    Join Date
    May 2001
    Location
    Dallas Texas
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The only account I've setup is the root user account
    Jeff Pace

  4. #4
    SitePoint Member
    Join Date
    May 2001
    Location
    Dallas Texas
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    also there is the mysqlusr account that the mysql deamon user to start mysql. Do I need to setup another user account so people can access the database via php pages?
    Jeff Pace

  5. #5
    <? echo "Kick me"; ?> petesmc's Avatar
    Join Date
    Nov 2000
    Location
    Hong Kong
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    IN your php script add:

    print mysql_error();

    That will tell you what the problem is so you can easily correct it. Also, make sure that you have mysql started.

  6. #6
    SitePoint Member
    Join Date
    May 2001
    Location
    Dallas Texas
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks guys... I figured it out, all I needed to do was specify a user in my php script to connect to mysql... cool.
    I wish I could post a link to the site, but it's an internal only website. I am working on a customer information web for HP. I'll be building my own database project after this one.
    Jeff Pace


Bookmarks

Posting Permissions

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