Announcement

Collapse
No announcement yet.

Database failed to connect!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Database failed to connect!

    I just bought vB tonight and I was installing it, and on the 2nd step out of the 13th I ran into this problem

    Step 2) Connect to the database

    Attempting to attach to database


    Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /home/geeks/public_html/support/includes/db_mysql.php on line 140
    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.

    and I looked over the config.php and everything seems to be in check! So what am I doing wrong ><?

  • #2
    It seems like for whatever reason, either the userID or the password is wrong, or that particular user do not have permission to access the database server (if it's hosted remotely).
    So Cal Sportbike forum - So Cal Moto - Kawasaki Ninja 250R Forum - Custom vinyl decals - Southern California camping forum

    Comment


    • #3
      Yea, I see where I messed up at. Under the database I forgot to the geeks_ lol, should have known better. Thanks for bringing that to my attention ^^!

      Comment


      • #4
        and i have same problem
        i have --dbusername--dbpassword--dbname from my server but again in my 3th step si same mesage

        Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in C:\Inetpub\www\kosovasat.com\forum\includes\db_mysql.php on line 140

        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.

        What have to do please help me

        Comment


        • #5
          This error means either:

          1. One or more of the following is wrong in your config.php file:

          $servername (except in rare case, this should almost always be left as 'localhost')
          $dbusername
          $dbpassword
          $dbname

          If you are unsure of what the appropriate values are then you will need to ask your web host.

          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 contact your web host for help.
          Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
          Change CKEditor Colors to Match Style (for 4.1.4 and above)

          Steve Machol Photography


          Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


          Comment


          • #6
            Steve:

            I have installed PHP, Apache, and MySQL 5 locally in my Windows XP server, so I can install VB as testbed, prior to make mods to my live forum. I am getting the same error. I know it is because I need to create the database manually and give access.

            How do I do that in the command prompt of MySQL? I need to assign access to root as well to the database. I just need to know how to create the database and assign root the privileges.

            I am pretty sure that to grant all privileges I should use the following:

            Code:
             
            GRANT ALL PRIVILEGES ON dbname.* to [email protected] IDENTIFIED BY 'somepassword';
            Last edited by Julio; Thu 24 Mar '05, 4:59am.

            Comment


            • #7
              There's an additional cause of this problem that has just come to light:

              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/password-hashing.html
              http://dev.mysql.com/doc/mysql/en/up...-from-4-0.html
              Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
              Change CKEditor Colors to Match Style (for 4.1.4 and above)

              Steve Machol Photography


              Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


              Comment


              • #8
                Steve:

                Any chance you can let me know the command to create a database for MySQL?

                Comment


                • #9
                  Here is our online documentation for creating a new database and db user:

                  http://www.vbulletin.com/docs/html/create_database

                  And from the MySQL site:

                  http://dev.mysql.com/doc/mysql/en/CREATE_DATABASE.html
                  Steve Machol, former vBulletin Customer Support Manager (and NOT retired!)
                  Change CKEditor Colors to Match Style (for 4.1.4 and above)

                  Steve Machol Photography


                  Mankind is the only creature smart enough to know its own history, and dumb enough to ignore it.


                  Comment


                  • #10
                    Originally posted by IllusionFayth
                    Yea, I see where I messed up at. Under the database I forgot to the geeks_ lol, should have known better. Thanks for bringing that to my attention ^^!
                    Can you please explain in detail where you messed up? How you fixed it?

                    Thanks

                    I'm getting the same error message.

                    Comment


                    • #11
                      I got it, thanks for the help!

                      Comment


                      • #12
                        Can you please let me know how you fixed it? I still have this issue.

                        PHP 4
                        MySQL 4.1
                        Apache
                        Windows XP

                        Comment

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