1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Please i need assistance, MYSQL ACCESS ERROR

Discussion in 'PHP & Perl' started by iyobosa, Aug 2, 2013.

  1. iyobosa

    iyobosa Newbie

    Joined:
    Jul 14, 2013
    Messages:
    5
    Likes Received:
    0
    i have a php script, which i downloaded somewhere for auto-blog-commenting. Added mysql user,pass and database name and i uploaded it to my server host. I keep on getting error report page:

    Warning: mysql_connect() [function.mysql-connect]: Access denied for username (using password: YES) in ...line 10

    Warning: mysql_select_db() [function.mysql-connect]: Access denied for user 'root'(at)'localhost' (using password: NO) in... line 11

    Warning: mysql_select_db() [function.mysql-connect]: A link to the server could not be established in ...line 11

    i don't know what to do, as am not too familiar with this, but i understand that my user,pass and database name are correct.
    please send your helpful response!
     
  2. WORK@HOME

    WORK@HOME Senior Member

    Joined:
    Apr 25, 2013
    Messages:
    804
    Likes Received:
    363
    Location:
    Right Here
    Home Page:
    Do you have it setup as:

    databasename_name
    password
    databaseuser_user

    Also you may need to put a / at the end of your URL
     
  3. kuerten

    kuerten Newbie

    Joined:
    Apr 23, 2013
    Messages:
    41
    Likes Received:
    13
    No they aren't... Double check
     
  4. makinsales

    makinsales Regular Member

    Joined:
    Jul 23, 2011
    Messages:
    368
    Likes Received:
    283
    Location:
    The Murda Mitten
    your username, pass, and or server aren't correct. Without seeing the code, cant help.

    PHP does a good job telling you where to look.. Problems are on line 10, and line 11..

    Did you setup a mysql database?
     
  5. mteun

    mteun Newbie

    Joined:
    Jul 12, 2013
    Messages:
    19
    Likes Received:
    1
    First, you need to setup MySQL database correctly, test it first using the MySQL client tool, then link it using PHP code.
     
  6. qlwik

    qlwik Newbie

    Joined:
    Aug 18, 2011
    Messages:
    48
    Likes Received:
    9
    Maybe MySQL server address is wrong?
     
  7. methylenebl

    methylenebl Newbie

    Joined:
    Aug 6, 2013
    Messages:
    22
    Likes Received:
    5
    Cant really say much more without being able to view the actual code but it seems that the information you are using to access the database is wrong. or the database is refusing connections which would be a mysql config error.
     
  8. ventr

    ventr Newbie

    Joined:
    Jan 29, 2013
    Messages:
    28
    Likes Received:
    4
    Also chech if your server can connect to the DB server. Sometimes you need to add another user like mike (at) 123.11.12.13 with privileges to certain DB's to be able to connect to mysql server from ip 123.11.12.13