Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    Join Date
    Jun 2008
    Location
    pakistan
    Posts
    109

    Red face Unanswered: Connection With Database Problem?

    Step 2) Connect to the database

    Attempting to attach to database

    Error description: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: NO) /www/blackapplehost.com/k/i/t/kits/htdocs/includes/class_core.php on line 274

    The database has failed to connect because you do not have permission to connect to the server. Please confirm the values entered in the 'includes/config.php' file.

    WHEN I AM INSTALLING VBULLEITIN FORUM I OCCURED THIS ERROR CAN ANY BODY HELP ME TO OVERCOME THIS PROBLEM

  2. #2
    Join Date
    Jun 2007
    Location
    London
    Posts
    2,527
    This has nothing to do with db concepts - I suggest you get the post moved to the MySQL forum where you're more likely to get a useful response.

  3. #3
    Join Date
    Jun 2008
    Location
    pakistan
    Posts
    109

    thanks mike_bite_kite

    Quote Originally Posted by mike_bike_kite
    This has nothing to do with db concepts - I suggest you get the post moved to the MySQL forum where you're more likely to get a useful response.
    thanks to support mike_bike_kite

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    the php script has returned a line number indicating which script failed and at which line number.. script
    /www/blackapplehost.com/k/i/t/kits/htdocs/includes/class_core.php
    line number: 274

    the error message is telling you that you your script was unable to connect to the database. the most likely reason is you are using an invalid user id and or an invalid password. the fact the message refers to root at localhost suggests to me that the user id and password haven't been set for the script.. its a very poor application that users root as a password.... no ISP in their right mind would allow any third party script run as the root user. unless they don't care about security

    to resolve this you need to supply the correct user id and password combination. if this script is running on a remote server, which seems likely if you are connecting to blackapplehost then you need to make sure you use the values supplied by them to connect to their db. bear on mind they will probably have given you two userid password combinations (one for the database, and one to ftp/talk to the server to upload scripts.. you need the db userid.

    having done that you need to locate where these values go.. for that either look at the documentation supplied with the scripts OR look at class_core.php line 274 and work back from there.

    if the documentation doesn't provide an easy location for the database name , userid and password then you will need to examine the php pscript. look through the file first for a line using mysql_connect or mysqli::construct and then work back from there to find where these values are set. that means examining any include statements which incorporate valid php code from elsewhere in your system. I would expect there to be a either a configuration script or a central include file which contains the values.

    http://uk3.php.net/manual/en/mysqli.connect.php
    http://uk3.php.net/manual/en/book.mysqli.php
    http://uk3.php.net/manual/en/function.mysql-connect.php
    http://uk3.php.net/manual-lookup.php?pattern=myhsql
    http://uk3.php.net/
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Jun 2008
    Location
    pakistan
    Posts
    109
    // catch_db_error will handle exiting, no infinite loop here
    do
    {
    ----------------- this is the line 274 between dashes-----$link = $this->functions[$usepconnect ? 'pconnect' : 'connect']("$servername:$port", $username, $password);
    }
    ----------------------------------------------------------------------
    while ($link == false AND $this->reporterror);

    restore_error_handler();

  6. #6
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    in essence nothing has changed, you haven't really identified what the problem is as yet
    we know you are not connecting to the MySQL.. the connection is being rejected because you don't have the right permissions. Ivbe suggested you need to check to make sure that you are supplying the correct details
    ie the serverid, the userid and password. we are still at that stage

    so what are the values for
    "$servername:$port",
    $username,
    $password

    $usepconnect
    where is the script set up
    how is the script set up
    was the script INSTALLED
    were there any additional steps you had to do after downloading the script

    have you tried a Vbulletin forum to resolve this error?

    If you know the values you have supplied for the serverid, the userid and password are correct then it becomes an ISP issue.. ie why do the serverid, the userid and password they have supplied not work when connecting to their database server

    BTW as this is a PHP error (well in reality vBulletin error) I'll move it to the PHP section, but I'd reccommend that you find a vBulletin forum which can help you

    its nothing at all to do with MySQL, although it may be that the next step is MySQL
    I'd rather be riding on the Tiger 800 or the Norton

  7. #7
    Join Date
    Jun 2008
    Location
    pakistan
    Posts
    109
    i am installing a v bulletin forum at www.blackapplehost.com i am new in these things thats why i ask the user name what i write at the pconnect,
    $servername,$port
    $username
    $password
    tell me deeply please i am using third party domain now tell me please

  8. #8
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    we don't know these things
    they should have been provided by your ISP
    if you do not have that information then YOU have to talk to YOUR ISP. Even if we were to to try talk to ISP on YOUR behalf (and we won't) if they are a reputable ISP they wouldn't release that information.

    as said before this specific problem isn't really answerable here..... its to do with YOU, YOUR ISP and YOUR application (vBulletin)
    so I'd suggest you send an email to YOUR ISP and request they send you the information, outline your problem (if needs be point them to this site) and requet they help you.
    I'd rather be riding on the Tiger 800 or the Norton

  9. #9
    Join Date
    Jun 2008
    Location
    pakistan
    Posts
    109
    i have everything just tell me that which host name i write which username i write please tell me

  10. #10
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    Quote Originally Posted by don_log
    i have everything just tell me that which host name i write which username i write please tell me
    we don't know....

    depending on how the vBulletin application is written, the server, user and password are probably called in a common module or INCLUDEd in each script requiring database access

    at its crudest
    you need to define what the following variables hold
    $servername... is the name of the mySQL server
    $port... is the portid of the server (usually 3306)
    $username is the username
    $password is the password

    eg
    $servername= "myserver";
    $port = 3306;
    $username= "myUsername";
    $password = "myPassword";
    I'd rather be riding on the Tiger 800 or the Norton

  11. #11
    Join Date
    Mar 2007
    Location
    010101010110100
    Posts
    803
    Healdem, he's getting the following error:
    Access denied for user 'root'@'localhost' (using password: NO)
    I'd bet this is a new db install. I'm making the assumption, based on the fact that he is installing vbull from scratch that the db is also new. If I'm right, he will have to grant permissions on that user first before any tcp connections can be accepted.

    Hey dong_long, is this a new install of mysql?

  12. #12
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    you may be right
    however its an install of vBulletin on a remote server

    my guess is that the dbserver, userid & password have't been set in the script.. reason its a remote ISP server but using root.. I don't think many ISP's will set up a db and give access to customers with the root user (or if they do they need dropping immediately)

    I suspect its a config issue, ie after installing the app on the remote server, there is a config step thats missing
    it may be thats all that is needed is to find the common module that has config data.. not knowing anything about vBulletin I don't know how it setup. However Im pretty certain that stuff needs defining in "includes/config.php"

    If tis not that then I don't think in reality its something a general forums like this can do much about.... either don_log is going to have to go to a vBulletin forum of work it out with his ISP
    I'd rather be riding on the Tiger 800 or the Norton

  13. #13
    Join Date
    Jun 2008
    Location
    pakistan
    Posts
    109
    $config['Database']['dbtype'] = 'mysql';
    // ****** DATABASE NAME ******
    // This is the name of the database where your vBulletin will be located.
    // This must be created by your webhost.

    $config['Database']['dbname'] = 'kits_itmag';
    // ****** TABLE PREFIX ******
    // Prefix that your vBulletin tables have in the database.
    $config['Database']['tableprefix'] = ''; here what i write in quotes

    //****** TECHNICAL EMAIL ADDRESS ******
    //If any database errors occur, they will be emailed to the address specified here.
    //Leave this blank to not send any emails when there is a database error.

    $config['Database']['technicalemail'] = 'itmag@ymail.com';

    //****** FORCE EMPTY SQL MODE ******
    // New versions of MySQL (4.1+) have introduced some behaviors that are
    // incompatible with vBulletin. Setting this value to "true" disables those
    // behaviors. You only need to modify this value if vBulletin recommends it.

    $config['Database']['force_sql_mode'] = true;

    //****** MASTER DATABASE SERVER NAME AND PORT ******
    //This is the hostname or IP address and port of the database server.
    //If you are unsure of what to put here, leave the default values.

    $config['MasterServer']['servername'] = '74.86.223.248';

    here what i write ip of the server or http://www.blackapplehost.com or http://kits.blackapplehost.com

    $config['MasterServer']['port'] = 3306;

    //****** MASTER DATABASE USERNAME & PASSWORD ******
    //This is the username and password you use to access MySQL.
    //These must be obtained through your webhost.

    $config['MasterServer']['username'] = 'kits';
    $config['MasterServer']['password'] = '******';

  14. #14
    Join Date
    Jun 2008
    Location
    pakistan
    Posts
    109
    read the above coding healdem then tell me what i want i configure it and now i face this error


    Step 2) Connect to the database

    Attempting to attach to database

    Error description:

    The database has failed to connect because you do not have permission to connect to the server. Please confirm the values entered in the 'includes/config.php' file.

  15. #15
    Join Date
    Jun 2008
    Location
    pakistan
    Posts
    109
    tell me the procedure after it

Posting Permissions

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