SQL error 1142, help me!!!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Turbo_WRX
    Member
    • Mar 2005
    • 45

    SQL error 1142, help me!!!

    Ok, I recently installed the Articles script hack last night, and everything was working great until this afternoon when I try logging in, I get this error:

    Database error in vBulletin 3.0.7:
    Invalid SQL:
    INSERT INTO session
    (sessionhash, userid, host, idhash, lastactivity, styleid, loggedin, bypass, useragent)
    VALUES
    ('6557dd4afeb556188f9dc3297d739e1f', 2, '208.13.141.39', 'b2d394304190d2eda99a63c9b56a2065', 1111691858, 0, 1, 0, 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)')

    mysql error: insert command denied to user: '[email protected]' for table 'session'
    mysql error number: 1142
    Date: Thursday 24th of March 2005 02:17:38 PM
    Script: http://www.vegasimports.com/forum/login.php
    Referer: http://www.vegasimports.com/forum/
    Username: Midnight Desires
    IP Address: xxx.xx.xxx.xx
    i get similar messages when trying to post, pm, reply, ect ect ect. Can anyone help? $10 paypal if you help me fix this problem
  • Dennis Olson
    Senior Member
    • Oct 2002
    • 2789

    #2
    Answered on your other thread.

    Comment

    • Turbo_WRX
      Member
      • Mar 2005
      • 45

      #3
      ok, so what do i do what all that?

      Comment

      • Turbo_WRX
        Member
        • Mar 2005
        • 45

        #4
        I don't know what happened to cause this. I mean, last night it worked fine...

        Comment

        • Dennis Olson
          Senior Member
          • Oct 2002
          • 2789

          #5
          Dude, the issue is that the MySQL username you are attempting to access your tables with does not have full permissions to the database. You must GRANT ALL PERMISSIONS to that username in order to stop the error. The link I supplied you with will explain the proper syntax for executing the GRANT query. You'll need to be logged on your server via SSH/Telnet, or via phpMyAdmin. You'll need the "master" database username in order to grant permissions to a different user. The database username that is accessing all tables is specified in your CONFIG.PHP file. Normally, that name is SomeName@localhost. The "@localhost" does not appear in the username in CONFIG.PHP. I suspect that your hack was not correctly installed however....

          EDIT: In your error message, this is the username listed:

          [email protected]

          That doesn't look like the correct suffix to me. JMHO...
          Last edited by Dennis Olson; Thu 24 Mar '05, 10:48am.

          Comment

          • Dennis Olson
            Senior Member
            • Oct 2002
            • 2789

            #6
            In your config.php file (in your vb base directory under /includes), you'll find the following information:

            Code:
            // ****** DATABASE SERVER NAME ******
            // This is the hostname or IP address of the database server.
            // It is in the format HOST:PORT. If no PORT is specified, 3306 is used.
            // If you are unsure of what to put here, leave it at the default value.
            $servername='localhost';
            
            // username and password to log onto db server
            $dbusername='SomeUserName';
            $dbpassword='SomePassword';
            
            // name of database
            $dbname='YourDatabaseName';
            You need to verify that full permissions are granted for the username specified above.

            Comment

            • Turbo_WRX
              Member
              • Mar 2005
              • 45

              #7
              still can't get it to work

              Comment

              • Marco van Herwaarden
                Senior Member
                • Nov 2004
                • 6999
                • 3.8.x

                #8
                Did your host maybe do a MySQL upgrade?
                Want to take your board beyond the standard vBulletin features?
                Visit the official Member to Member support site for vBulletin Modifications: www.vbulletin.org

                Comment

                • Turbo_WRX
                  Member
                  • Mar 2005
                  • 45

                  #9
                  not to my knowledge

                  Comment

                  • Dennis Olson
                    Senior Member
                    • Oct 2002
                    • 2789

                    #10
                    Do you have access to your CONFIG.PHP file, in order to review its contents? Do you have SSH or phpMyAdmin access to your database? Until you answer these questions, there's nothing we can do for you.

                    Comment

                    • Turbo_WRX
                      Member
                      • Mar 2005
                      • 45

                      #11
                      yes, I have access to config.php, and ssh or phpmyadmin, how do i get to that?

                      Comment

                      • Turbo_WRX
                        Member
                        • Mar 2005
                        • 45

                        #12
                        everything in config.php looks right...

                        Comment

                        • Turbo_WRX
                          Member
                          • Mar 2005
                          • 45

                          #13
                          This is the only thing in config.php that doesn't look normal...
                          // Prefix that your vBulletin tables have in the database.
                          // For example: $tableprefix = 'vb3_';
                          $tableprefix = '';
                          is that correct?

                          Comment

                          • Dennis Olson
                            Senior Member
                            • Oct 2002
                            • 2789

                            #14
                            SSH is a secure version of Telnet. If you do not own the server, you need to ask your host if they give you SSH access. If so, they need to provide you with a username/password for a tty session. You need to download a program like PuTTY (free) and logon to the server in character-mode. Armed with the knowledge of where your database lives (info also provided by the host), you can run MySQL, and then attempt to logon using the database name, db-username, and db-userpass found in your config.php file. If you CANNOT do so, that's your problem. Something in your config.php files DOES NOT MATCH what the SQL database is expecting to see. Since that's the case, vB will not talk to the database AT ALL until that issue is rectified.

                            You'd need to make sure (via speaking to your host) that all the database access parms match the actual settings in the MySQL database.

                            phpMyAdmin is a web-based product that allows you to speak directly to the database over a web browser, without having to navigate the Linux OS (which can be quite intimidating for those that don't know Unix). Your host can tell you if they have that product installed, as well as the URL for you to access it.

                            One way or another, you MUST talk directly to your database, in order to verify everything. Until you can successfully do that, you're dead-in-the-water...
                            Last edited by Dennis Olson; Fri 25 Mar '05, 11:08am.

                            Comment

                            • Dennis Olson
                              Senior Member
                              • Oct 2002
                              • 2789

                              #15
                              If in doubt about the $tableprefix, just set it to blank and try it out. You can always put it back...

                              Comment

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