Step 2 Connect to database help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • opti.janie
    New Member
    • Aug 2009
    • 10

    Step 2 Connect to database help

    Hello Everyone,

    I finally successfully uploaded everything... I don't know what I did or doing wrong but when I go to set up vbulletin I am stuck on step 2 I try to reconfig it but I have no idea what is needed

    this is the error I keep on getting...

    Attempting to attach to database

    Error description: mysql_connect() [function.mysql-connect]: Access denied for user 'XXXXl'@'localhost' (using password: NO) /home/XXXX/public_html/includes/class_core.php on line 311

    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.


    I know everyone is really busy, but any help will be greatly appreciated.

    Thanks in advance
    Janie
  • Steve Machol
    Former Customer Support Manager
    • Jul 2000
    • 154488

    #2
    The most likely cause of this error is that the info in your config.php file is wrong or your db user does not have full permissions to this database. Please read this for all the known causes of this error:

    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

    • opti.janie
      New Member
      • Aug 2009
      • 10

      #3
      Hi Steve,

      Thank you for the quick reply, I have full permission on my database, and check the config. I'm pretty sure that the info is correct. I'm read through the links you posted... I'm still getting the same error

      Comment

      • Steve Machol
        Former Customer Support Manager
        • Jul 2000
        • 154488

        #4
        That links contains all the known causes of that error and in 8 years of doing this I have never seen it caused by anything else. This itself is pretty clear:

        Access denied for user 'XXXXl'@'localhost' (using password: NO)

        I suggest contacting your host for further help with this. Clearly something is wrong. Perhaps there is an issue with the server.
        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

        • Steven Edwards
          New Member
          • Aug 2007
          • 18
          • 3.6.x

          #5
          Originally posted by Steve Machol
          That links contains all the known causes of that error and in 8 years of doing this I have never seen it caused by anything else.
          Steve,

          There may be a new error, then. I'm migrating my vBulletin setup to new servers and am receiving the same error.

          Current setup: vB 3.8.3+MySQL on a single server.

          New setup: vB 3.8.3 on one (slave) server [xxx-web.xxx.yyy], MySQL master on another [xxx-db.xxx.yyy].

          SSH'd in to -web, I can connect to -db using the login info I placed in config.php. From vBulletin, however, I cannot.

          Going a step further, I wrote this simple code to verify that PHP can connect:

          Code:
          <?
          $server = '';
          $port = 3306;
          $user = '';
          $pass = '';
          
          $link = mysql_connect("$server:$port", $user, $pass);
          if (!$link) {
              die('Could not connect: ' . mysql_error());
          }
          ?>
          With the values from config.php filled in, it works perfectly.

          Can you offer any suggestions?

          Thanks,

          Steven

          Comment

          • Steve Machol
            Former Customer Support Manager
            • Jul 2000
            • 154488

            #6
            Since that age has all the known causes of this problem, then by definition this one is unknown and is certainly a server problem. If there is a new issue then this is something you will have to have your host investigate.

            Once they have figured this out you can let us know and we can update that page is it really is a new problem.
            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

            • Steven Edwards
              New Member
              • Aug 2007
              • 18
              • 3.6.x

              #7
              Originally posted by Steve Machol
              Since that age has all the known causes of this problem, then by definition this one is unknown and is certainly a server problem. If there is a new issue then this is something you will have to have your host investigate.

              Once they have figured this out you can let us know and we can update that page is it really is a new problem.
              If it were a host error, wouldn't I get an error when I tried logging in from the command line and/or the PHP script?

              Comment

              • Steve Machol
                Former Customer Support Manager
                • Jul 2000
                • 154488

                #8
                There should be something in the server errors logs, yes. All I can state categorically is if the info in config.php is correct and the server is setup correctly, then this would work. Since you state the info is correct then this has to be a server issue. As I said it is also a previously unknown issue that has never come up before in the 8 years I have been doing this. If it was a known issue we would have updated that page.
                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

                • Steven Edwards
                  New Member
                  • Aug 2007
                  • 18
                  • 3.6.x

                  #9
                  All I'm saying is "hey, this may not be a server issue, so you guys may want to look into it."

                  (I do give you credit for categorically stating that it's a server issue, then effectively walking it back by saying it may be a previously unknown [vB] issue. )

                  Comment

                  • Steve Machol
                    Former Customer Support Manager
                    • Jul 2000
                    • 154488

                    #10
                    Originally posted by Steven Edwards
                    All I'm saying is "hey, this may not be a server issue, so you guys may want to look into it."

                    (I do give you credit for categorically stating that it's a server issue, then effectively walking it back by saying it may be a previously unknown [vB] issue. )
                    It is either the wrong info, the wrong permissions or a server issue. Those really are the only choices. You say it's not the first two which only leaves the server.

                    Also I did I not say it was an unknown vB issue. The 'unknown' part has to do with the server. Sorry that was not clear.
                    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

                    • Steven Edwards
                      New Member
                      • Aug 2007
                      • 18
                      • 3.6.x

                      #11
                      Sorry Steve—no need to take me so seriously. I'm just trying to keep things lighthearted while I debug whatever the issue may be.

                      Comment

                      • Steven Edwards
                        New Member
                        • Aug 2007
                        • 18
                        • 3.6.x

                        #12
                        Simple solution: "setsebool -P httpd_can_network_connect true". (SELinux blocks outgoing connections from the web server by default, apparently.)

                        Steven

                        p.s., I'll take my crow baked, please.

                        Comment

                        • Steve Machol
                          Former Customer Support Manager
                          • Jul 2000
                          • 154488

                          #13
                          Interesting. Can you lease explain that some more? I don't see how it's applicable unless the database is on a different server. I'll be glad to update the troubleshooting page if you can provide the relevant info.
                          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

                          • Steven Edwards
                            New Member
                            • Aug 2007
                            • 18
                            • 3.6.x

                            #14
                            I wasn't receiving the exact same message as the OP, apparently.

                            I'll have a server acting as a webhead and another as the database server. I had the database server's FQDN as ['MasterServer']['servername'] and was receiving a database connection error from vBulletin that directed me to line 311 in includes/class_core.php.

                            Running the PHP above from the command line worked, so I tested it from the web (using lighttpd+APC) and received a database connection error. I then modified the PHP to attempt a connection to port 3306 on the database server directly and received error number 13, error string Permission denied. I then tried retrieving Google's homepage in PHP from the web and got the same error, which convinced me that something was preventing lighttpd from making outgoing connections.

                            A few searches later led me to SELinux being the culprit and offering the setselinux command in my previous post as a way to fix Apache. I couldn't find anything that mentioned a comparable command for lighttpd, so I ran the command and then ran the modified PHP script to see if it worked. It did, so I tested vBulletin and it worked, too. (I then came and made my crow comment. )

                            Does that help?

                            Steven

                            Comment

                            • Steve Machol
                              Former Customer Support Manager
                              • Jul 2000
                              • 154488

                              #15
                              Thanks. I've updated the troubleshooting page with a link to your post.
                              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

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