step 2) Connect to the database

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • misformartin
    New Member
    • Apr 2007
    • 1

    step 2) Connect to the database

    i'm getting the following error:

    Step 2) Connect to the database
    Attempting to attach to database
    Error description: mysql_connect(): Can't connect to local MySQL server through socket '/usr/local/mysql-5.0/data/mysql.sock' (2) /home/content/_/_/_/_____/html/forum/includes/class_core.php on line 273

    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.






    can someone help me?
  • Wayne Luke
    vBulletin Technical Support Lead
    • Aug 2000
    • 73976

    #2
    This error means either:
    1. One or more of the following is wrong in your config.php file:
    $config['MasterServer']['servername'] (except in rare cases, this should almost always be left as 'localhost' or '127.0.0.1')
    $config['MasterServer']['username']
    $config['MasterServer']['password']
    $config['Database']['dbname']
    If you are unsure of what the appropriate values are then you will need to ask your web host.
    NOTE: Please note that you can NOT use the config.php file from version 2.x or 3.0.x on a 3.6.0 forum.

    2. Or that this db user is not assigned to that database or does not have permission to access MySQL to create or access a database. You may need to first manually create the database and assign the db user to it. Since each web host is different, if you do not know how to do this then contactyour web host for help.

    3. Or you are running MySQL 4.1.x. As of MySQL 4.1.X there is a new password hashing system. PHP4 does not have builtin support for it as of yet, however PHP5 does. In order for your old PHP4 MySQL clients to be able to connect to the MySQL 4.1.X database you need to set an OLD_PASSWORD. You should be able to run the following Query to make it possible for PHP4 to access the MySQL 4.1.X database.
    SET PASSWORD FOR 'username'@'localhost' = OLD_PASSWORD('password');
    More info is here:

    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment

    • AndMcgr
      New Member
      • Mar 2007
      • 26

      #3
      Make a new database and try it on the new one. My guess is that it is something to do with your hosting.

      Comment

      • dpatel304
        New Member
        • Sep 2006
        • 16

        #4
        Originally posted by Wayne Luke
        This error means either:
        1. One or more of the following is wrong in your config.php file:
        $config['MasterServer']['servername'] (except in rare cases, this should almost always be left as 'localhost' or '127.0.0.1')
        $config['MasterServer']['username']
        $config['MasterServer']['password']
        $config['Database']['dbname']
        If you are unsure of what the appropriate values are then you will need to ask your web host.
        NOTE: Please note that you can NOT use the config.php file from version 2.x or 3.0.x on a 3.6.0 forum.

        2. Or that this db user is not assigned to that database or does not have permission to access MySQL to create or access a database. You may need to first manually create the database and assign the db user to it. Since each web host is different, if you do not know how to do this then contactyour web host for help.

        3. Or you are running MySQL 4.1.x. As of MySQL 4.1.X there is a new password hashing system. PHP4 does not have builtin support for it as of yet, however PHP5 does. In order for your old PHP4 MySQL clients to be able to connect to the MySQL 4.1.X database you need to set an OLD_PASSWORD. You should be able to run the following Query to make it possible for PHP4 to access the MySQL 4.1.X database.
        SET PASSWORD FOR 'username'@'localhost' = OLD_PASSWORD('password');
        More info is here:

        http://dev.mysql.com/doc/mysql/en/up...-from-4-0.html

        I am having this same problem. I know for sure #1 is not the problem (unless its one of those rare instances that I have to change 'localhost'). #2 and #3 shouldn't be a problem. At least I don't think so. I have phpbb installed, and those require both of those to not be problems (correct?). Any other solutions? Thanks.

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...