Announcement

Collapse
No announcement yet.

Database error only in CMS - no permission to lock tables. Please help.

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

  • [CMS] Database error only in CMS - no permission to lock tables. Please help.

    I tried to turn on my CMS yesterday (vB 4.1.7 P2) and got this database error when I tried to create a new article:

    Invalid SQL:
    LOCK TABLES vBcms_node WRITE, vBlanguage read;

    MySQL Error : Access denied for user 'xxxxx'@'%' to database 'xxxxxx'
    Error Number : 1044
    Request Date : Friday, December 2nd 2011 @ 12:26:14 AM
    Error Date : Friday, December 2nd 2011 @ 12:26:14 AM
    Script : http://www.biblewheel.com/content.ph...ome/addcontent
    Referrer : http://www.biblewheel.com/content.php?1-welcome
    IP Address : xxxxxx
    Username : xxx
    Classname : vB_Database
    MySQL Version : 5.1.42-community

    I've seen a few threads with this same problem, and the solution has always been to get more permissions from your host. But I talked with my host and they say I have "all the rights I need" to the db. Apparently not.

    But I don't understand why this would only happen with CMS. Is there never any "LOCK TABLES" queries in the rest of vB? Does anyone here understand what is really going on with this problem?
    Last edited by BibleWheel; Fri 2 Dec '11, 6:11pm.

  • #2
    Does anyone understand why this would only happen with CMS? Is there never any "LOCK TABLES" queries in the rest of vB? Does anyone here understand what is really going on with this problem?

    Comment


    • #3
      login into your cpanel and set permissions for the user usually running a query will do it

      Comment


      • #4
        Originally posted by TheNewOne View Post
        login into your cpanel and set permissions for the user usually running a query will do it
        Thanks, but I can't do that. My host controls permissions to the db. He said I have "all the permissions I need" and suggested the problem might be with vB. I explained that seemed unlikely since the database says I don't have permissions. I'll probably have to get a new host.

        I've pretty sure the problem is with permissions. But I was wondering why this problem only appears in CMS? Is there no other part of vB that uses lock tables? Why is lock tables needed just to make a new article? That's what's stopping my show.

        Comment


        • #5
          if you are paying for you should have access to the cpanel all hosting companys give it as default

          Comment


          • #6
            Clearly, you do not have all the permissions you need, if you need lock and their not giving it to you.

            Comment


            • #7
              Originally posted by Zachery View Post
              Clearly, you do not have all the permissions you need, if you need lock and their not giving it to you.
              Hi Zachery,

              That's what I told my host, and I still have my problem. So it looks like I need to upgrade to a better host.

              But I'm still curious, what's different about CMS? Why does this problem appear there and no where else in vB?

              Also, I found this that says you need more than the rights to your own db:

              I had just installed Drupal. Most stuff was working - I could add new stories, comments, etc. But on certain updates involved in that process, I got a database error like: user error: Access denied for user: '[email protected]' to database 'drupal' query: LOCK TABLES sequences WRITE in c:htdocsp0drupalincludesdatabase.mysql.inc on line 69. user error: Access denied for user: '[email protected]' to database 'drupal' query: LOCK TABLES sequences WRITE in c:htdocsp0drupalincludesdatabase.mysql.inc on line 69.

              One case not mentioned here and you get an 1045 "Access denied" error is when you don't have the privilege to alter system tables using "LOCK TABLES". The connect succeeds, but a "LOCK TABLES" query fails. Then you should ask the MySQL administrator to extend your privileges. The "LOCK TABLES" command is writing to the system tables. If the MySQL administrator decided to grant you all privileges only on your database, say foo.*, this won't be sufficient. You will need write access to 'mysql' database. If you don't have that, you will get a MySQL error "#1045 access denied" at the "LOCK TABLES" query. So, the case of "LOCK TABLE" privilege in MySQL breaks a privilege system where administrators decided to grant privileges ordered by database hierarchy.

              Comment


              • #8
                Originally posted by TheNewOne View Post
                if you are paying for you should have access to the cpanel all hosting companys give it as default
                I do have access to the cpanel, phpMyAdmin, and I can connect using MySQL Workbench. But they don't give you permissions to create users or grant rights. You have to request that they do it because its a system level privilege (lot's of databases in a single instance of MySQL, I believe). So I'm hunting for a new host. Got any suggestions?

                Comment


                • #9
                  cPanel, (the software, not just a "control panel") has a mysql databases section, which should list users and databases. You should be able to re-add the user to the database and give him the lock permission.

                  We use (or used to use) locks in other places, though just less public:http://dev.mysql.com/doc/refman/5.1/en/lock-tables.html

                  Comment


                  • #10
                    Originally posted by Zachery View Post
                    cPanel, (the software, not just a "control panel") has a mysql databases section, which should list users and databases. You should be able to re-add the user to the database and give him the lock permission.

                    We use (or used to use) locks in other places, though just less public:http://dev.mysql.com/doc/refman/5.1/en/lock-tables.html
                    Thanks for the info, I very much appreciate it Zachery.

                    I can connect directly to my db using MySQL Workbench, which has an administration page that is supposed to allow me to view/edit users and permissions, but my host doesn't all that. It gives an "Access Denied" when I try to access that feature. I'm sure the same thing would happen with cPanel.

                    So it looks like I am being forced to find a new host if I want to use CMS. It's probably a good idea anyway, since a host that doesn't give me full control over my database is a pretty lame host.

                    Comment


                    • #11
                      OK - I commented out the LOCK TABLES in my node.php and was able to get it working. But then when I tried to move the CMS to the root, I got this new error:

                      PHP Warning: require(./includes/class_bootstrap.php) [function.require]: failed to open stream: No such file or directory in D:\Domains\biblewheel.com\www\Forum\vb\bootstrap.php on line 30 PHP Fatal error: require() [function.require]: Failed opening required './includes/class_bootstrap.php' (include_path='.;c:\\php\\php5\\ext') in D:\Domains\biblewheel.com\www\Forum\vb\bootstrap.php on line 30

                      Obviously, there is some problem with the path, but I checked the settings in the vb_dir.php and the CMS Component URL on the ACP > Options > Site Name / URL / Contact Details page and they look correct (and work on my localhost). So I put in an echo(getcwd()); in the bootstrap.php and found that the cwd was c:\windows but the site is on d:\domains\ etc. WTF????



                      BTW - the arrow keys don't work in the quick edit box! I'd think by the second decade of the 21st century we should have the basics of "edit boxes" worked out.

                      Comment


                      • #12
                        Originally posted by BibleWheel View Post
                        OK - I commented out the LOCK TABLES in my node.php and was able to get it working. But then when I tried to move the CMS to the root, I got this new error:

                        PHP Warning: require(./includes/class_bootstrap.php) [function.require]: failed to open stream: No such file or directory in D:\Domains\biblewheel.com\www\Forum\vb\bootstrap.php on line 30 PHP Fatal error: require() [function.require]: Failed opening required './includes/class_bootstrap.php' (include_path='.;c:\\php\\php5\\ext') in D:\Domains\biblewheel.com\www\Forum\vb\bootstrap.php on line 30

                        Obviously, there is some problem with the path, but I checked the settings in the vb_dir.php and the CMS Component URL on the ACP > Options > Site Name / URL / Contact Details page and they look correct (and work on my localhost). So I put in an echo(getcwd()); in the bootstrap.php and found that the cwd was c:\windows but the site is on d:\domains\ etc. WTF????



                        BTW - the arrow keys don't work in the quick edit box! I'd think by the second decade of the 21st century we should have the basics of "edit boxes" worked out.
                        Well alrighty then! I traced out the error with echoes and then just added a chdir(dirname(__FILE__)); in the forum/content.php. It looks like everything is working. I have no idea why the cwd was wrong. Everything worked fine if I ran the CMS in the forum folder. But moving it to the root messed everything up. As far as I know, I have the same setup on my localhost as my live host where I didn't have any of these problems.

                        On the upside - I'm starting to feel like I can man-handle vB. But it bugs me that I don't know what caused this problem.
                        Last edited by BibleWheel; Sun 4 Dec '11, 8:10am.

                        Comment


                        • #13
                          Hummm .... now I'm getting another access denied error from the CMS code. I've never had any problem with database access from any other part of vB.

                          What's different about CMS?

                          Database error in vBulletin 4.1.7:

                          Invalid SQL:
                          CREATE TEMPORARY TABLE cms_nc_orphans AS
                          select nc.nodeid FROM vBcms_nodecategory nc LEFT JOIN vBcms_node AS node on node.nodeid = nc.nodeid
                          WHERE node.nodeid IS NULL;;

                          MySQL Error : Access denied for user 'xxxxxx'@'%' to database 'xxxxxx'
                          Error Number : 1044
                          Request Date : Saturday, December 3rd 2011 @ 09:00:09 PM
                          Error Date : Saturday, December 3rd 2011 @ 09:00:09 PM
                          Script : http://www.biblewheel.com/forum/bw_a...p?do=fix_nodes
                          Referrer : http://www.biblewheel.com/forum/bw_a...dex.php?do=nav
                          IP Address : 97.114.65.202
                          Username : xxxxxx
                          Classname : vB_Database
                          MySQL Version : 5.1.42-community

                          Comment


                          • #14
                            Looks like you dont have access to CREATE TEMPORARLY TABLE either, find a new webhost,

                            Comment


                            • #15
                              Originally posted by Zachery View Post
                              Looks like you dont have access to CREATE TEMPORARLY TABLE either, find a new webhost,
                              Yep - that's the plan.

                              At least I managed to get everything else working despite my host's problems.

                              Comment

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