+ Reply to Thread
Results 1 to 15 of 23
Page 1 of 2
FirstFirst 1 2 ... LastLast

Thread: Database Error Number 1146

  1. #1
    Member rcwild has disabled reputation
    Join Date
    Mar 2004
    Location
    Utah
    Posts
    70

    Database Error Number 1146

    It appears I am not the only one having this issue. I installed all of the files from the upload folder (except install/install.php). I changed config.php.new to config.php and edited the values. The database name and table prefix('sd_') are correct. When I open ../install/upgrade.php I get the Database Error message quoted below. I'm referring to a message on the webpage – ../install/upgrade.php. I'm receiving the error message by email, too (hundreds of times).

    I use a content management system called SubDreamer. I turned it off before attempting to install the vBulletin upgrade.

    I re-uploaded all of the files a second and third time and still get the same error message.

    When I attempt to access my admincp, I get an error page: "Database error. The database has encountered a problem."

    Before posting this I reviewed several existing threads and found most of the advice related to incorrect table prefix, database name, plugins or not installing all of the files. I don't believe any of these apply to my situation. What else could it be?

    Database error in vBulletin :

    Invalid SQL:

    SELECT *
    FROM sd_datastore
    WHERE title IN ('','options','bitfields','attachmentcache','forum cache','usergroupcache','stylecache','languagecach e','products','pluginlist','cron','profilefield');

    MySQL Error : Table 'content.sd_datastore' doesn't exist
    Error Number : 1146
    Date : Tuesday, July 3rd 2007 @ 05:44:59 AM
    Script : http://www.xxx.com/forums/install/upgrade.php
    Referrer :
    IP Address : xx.xxx.xxx.xxx
    Username :
    Classname : vb_database

  2. #2
    vBulletin Team Colin F will become famous soon enough Colin F will become famous soon enough Colin F's Avatar
    Join Date
    May 2004
    Location
    Switzerland
    Posts
    17,575
    Where you running vBulletin before already - is this an upgrade?
    Best Regards
    Colin Frei

    The closer something gets to perfection, the more minute flaws become visible.
    Please don't contact me per PM.

  3. #3
    Member rcwild has disabled reputation
    Join Date
    Mar 2004
    Location
    Utah
    Posts
    70
    Yes. This is an upgrade.

  4. #4
    Member rcwild has disabled reputation
    Join Date
    Mar 2004
    Location
    Utah
    Posts
    70
    Anyone have an idea how to solve this problem?

  5. #5
    vBulletin Team Wayne Luke is a name known to all Wayne Luke is a name known to all Wayne Luke is a name known to all Wayne Luke is a name known to all Wayne Luke is a name known to all Wayne Luke is a name known to all Wayne Luke's Avatar
    Join Date
    Aug 2000
    Location
    So. California
    Age
    38
    Posts
    34,673
    Blog Entries
    1
    What version are you upgrading from? That table is a pretty important table and has been in the system since 3.0.
    Wayne Luke
    Get started with your own social network.
    Purchase and download vBulletin today.
    vBCodex (Running vB 4.0 Suite) - Take your vBulletin Community to the next level. Modification tips, tricks and support.

  6. #6
    Member rcwild has disabled reputation
    Join Date
    Mar 2004
    Location
    Utah
    Posts
    70
    Upgrading from 3.6.3. I looked in the database. It's not there.

  7. #7
    vBulletin Team Wayne Luke is a name known to all Wayne Luke is a name known to all Wayne Luke is a name known to all Wayne Luke is a name known to all Wayne Luke is a name known to all Wayne Luke is a name known to all Wayne Luke's Avatar
    Join Date
    Aug 2000
    Location
    So. California
    Age
    38
    Posts
    34,673
    Blog Entries
    1
    You had a table prefix previously in 3.6.3 correct? If not, remove the table prefix from your 3.6.7 config.php file. Is so, then you will have to recreate the table as vBulletin won't work without it.
    Code:
    CREATE TABLE sd_datastore (
     title CHAR(50) NOT NULL DEFAULT '',
     data MEDIUMTEXT,
     unserialize SMALLINT NOT NULL DEFAULT '0',
     PRIMARY KEY (title)
    )
    Wayne Luke
    Get started with your own social network.
    Purchase and download vBulletin today.
    vBCodex (Running vB 4.0 Suite) - Take your vBulletin Community to the next level. Modification tips, tricks and support.

  8. #8
    Member rcwild has disabled reputation
    Join Date
    Mar 2004
    Location
    Utah
    Posts
    70
    Yes. The "sd_" prefix has been in place for a long time. In fact, I copied the old config.php into my text editor so I had all the info handy to re-enter into the new file.

  9. #9
    Member rcwild has disabled reputation
    Join Date
    Mar 2004
    Location
    Utah
    Posts
    70
    First, an admission of stupidity. I copied settings from old config.php file, but it now appears I opened the wrong file. Tables with sd_ prefix pertain to our SubDreamer content management system. Tables pertaining to vBulletin have vb3_ prefix. I think I would have discovered the problem earlier, but after posting here I also discovered that our website was moved to another server during the day. My access to our database was intermitent throughout the day.

    I uploaded all of the upgrade files (which turned out to be to the old server). When trying to run ../install/upgrade.php, I never made it past the database error message. Left for a few hours. Came back and discovered the error message was gone. Miracle? Proceeded with ../install/upgrade.php (which turned out to be on the new server). No glitches ... until I got to the admincp and noticed we were still running 3.6.3. Checked the files on the server. All 3.6.3. Contacted our server admin who told me about the server move.

    From this point forward, I assumed my problems were related to the server move. Tunnel vision. Install attempts using sd_ prefix continued to fail. I asked server admin if move could have deleted the sd_datastore table. To be sure, she restored the site from a backup that was run before the server move. As soon as I regained access to the database, I opened phpMyAdmin to look for sd_datastore. Found vb3_datastore. Doh!

    Reinstalled all upgrade files. Changed config.php.new to config.php and edited values, including table prefix vb3_. Ran ../install/upgrade.php successfully. Forums back on line. Yippee!

    But ... I continue to receive hundreds of database error emails like the one quoted below. ??

    Database error in vBulletin :

    Invalid SQL:

    SELECT *
    FROM sd_datastore
    WHERE title IN ('','options','bitfields','attachmentcache','forum cache','usergroupcache','stylecache','languagecach e','products','pluginlist','cron','profilefield',' smiliecache','bbcodecache','mailqueue');

    MySQL Error : Table 'content.sd_datastore' doesn't exist
    Error Number : 1146
    Date : Wednesday, July 4th 2007 @ 05:56:43 AM
    Script : ../forums/showthread.php?p=2841
    Referrer :
    IP Address : xx
    Username :
    Classname : vb_database

  10. #10
    vBulletin Team Wayne Luke is a name known to all Wayne Luke is a name known to all Wayne Luke is a name known to all Wayne Luke is a name known to all Wayne Luke is a name known to all Wayne Luke is a name known to all Wayne Luke's Avatar
    Join Date
    Aug 2000
    Location
    So. California
    Age
    38
    Posts
    34,673
    Blog Entries
    1
    The notices are probably backlog on your email server. You could ask your hosting provider if they can clear that queue. That email would have been generated every time someone hit your page while the wrong prefix was enabled.
    Wayne Luke
    Get started with your own social network.
    Purchase and download vBulletin today.
    vBCodex (Running vB 4.0 Suite) - Take your vBulletin Community to the next level. Modification tips, tricks and support.

  11. #11
    Member rcwild has disabled reputation
    Join Date
    Mar 2004
    Location
    Utah
    Posts
    70
    Unfortunately, I fear the problem is a bit more serious. While our forum is up and running, we're getting error messages in web pages from some functions. For example, when I try to view "New Posts", I get:

    Database error in vBulletin 3.6.3:

    Invalid SQL:
    SELECT searchid FROM vb3_search AS search WHERE userid = 3 AND searchhash = '5c3f0f51186248594504f962a9f31c9f' AND orderedids = '867,1672,700,1670,1668' AND announceids = '' AND completed = 1;

    MySQL Error : Unknown column 'completed' in 'where clause'
    Error Number : 1054
    Date : Thursday, July 5th 2007 @ 10:06:50 AM
    Script : ../forums/search.php?do=getdaily
    Referrer : ../forums/search.php?do=getnew
    IP Address : xxx
    Username : xxx
    Classname : vb_database
    I also don't understand how the email error messages could refer to sd_datastore when I was never successful with the installation until I used vb3_ as the table prefix.

  12. #12
    vBulletin Team Wayne Luke is a name known to all Wayne Luke is a name known to all Wayne Luke is a name known to all Wayne Luke is a name known to all Wayne Luke is a name known to all Wayne Luke is a name known to all Wayne Luke's Avatar
    Join Date
    Aug 2000
    Location
    So. California
    Age
    38
    Posts
    34,673
    Blog Entries
    1
    When you upgraded to the newer version did you run the complete upgrade script? Run the following query:

    ALTER TABLE `vb3_search` ADD `completed` SMALLINT( 5 ) UNSIGNED NOT NULL DEFAULT 1;

    Emails refer to sd_datastore because that is on of the first queries run on every page load. The sd_ comes from the incorrect prefix in the config.php file. The script is telling you the table doesn't exist, which would have been the correct error. You can get the same email by uploading all the vBulletin files and never running an install script.
    Wayne Luke
    Get started with your own social network.
    Purchase and download vBulletin today.
    vBCodex (Running vB 4.0 Suite) - Take your vBulletin Community to the next level. Modification tips, tricks and support.

  13. #13
    Member rcwild has disabled reputation
    Join Date
    Mar 2004
    Location
    Utah
    Posts
    70
    Quote Originally Posted by Wayne Luke View Post
    When you upgraded to the newer version did you run the complete upgrade script?
    Yes.

    Quote Originally Posted by Wayne Luke View Post
    Run the following query:

    ALTER TABLE `vb3_search` ADD `completed` SMALLINT( 5 ) UNSIGNED NOT NULL DEFAULT 1;
    Don't know how to run queries.

    Quote Originally Posted by Wayne Luke View Post
    Emails refer to sd_datastore because that is on of the first queries run on every page load. The sd_ comes from the incorrect prefix in the config.php file. The script is telling you the table doesn't exist, which would have been the correct error. You can get the same email by uploading all the vBulletin files and never running an install script.
    The table prefix in the config.php file is correct: vb3_

    If my FAILED installation attempt using sd_ in the config.php set something in motion to always search for sd_datastore, how do I shut that off? Is there a line of code in a script somewhere that I can change? Something in a table that I can change? Re-run the upgrade?

  14. #14
    vBulletin Team Wayne Luke is a name known to all Wayne Luke is a name known to all Wayne Luke is a name known to all Wayne Luke is a name known to all Wayne Luke is a name known to all Wayne Luke is a name known to all Wayne Luke's Avatar
    Join Date
    Aug 2000
    Location
    So. California
    Age
    38
    Posts
    34,673
    Blog Entries
    1
    Once you update your config.php to the proper prefix it will look for the proper table. There is no other place to change it at unless you modified the code.

    You can run queries within the vBulletin Admin Control Panel by going to Maintenance -> Execute SQL Queries.

    To run Queries in the Admin Control Panel you need to edit your config.php file and add your user ID to the Can Run Queries section. It looks like:

    // ****** USERS WITH QUERY RUNNING PERMISSIONS ******
    // The users specified here will be allowed to run queries from the control panel.
    // See the above entries for more information on the format.
    // Please note that the ability to run queries is quite powerful. You may wish
    // to remove all user IDs from this list for security reasons.
    $config['SpecialUsers']['canrunqueries'] = '';

    Place your user id between the single quotes.
    Wayne Luke
    Get started with your own social network.
    Purchase and download vBulletin today.
    vBCodex (Running vB 4.0 Suite) - Take your vBulletin Community to the next level. Modification tips, tricks and support.

  15. #15
    Member rcwild has disabled reputation
    Join Date
    Mar 2004
    Location
    Utah
    Posts
    70
    Ran the query and received this response:

    An error occurred while attempting to execute your query. The following information was returned.
    error number: 1060
    error desc: Duplicate column name 'completed'

+ Reply to Thread
Page 1 of 2
FirstFirst 1 2 ... LastLast

Similar Threads

  1. Database Error Number : 1146, Invalid SQL
    By Jose Amaral Rego in forum vBulletin 3.6 Questions, Problems and Troubleshooting
    Replies: 1
    Last Post: Sun 4th Mar '07, 8:29pm
  2. Error Number : 1146
    By iran.gs in forum vBulletin 3.6 Questions, Problems and Troubleshooting
    Replies: 1
    Last Post: Wed 24th Jan '07, 6:16pm
  3. Error number 1146
    By Secret Lemonade in forum vBulletin 3.5 'How Do I' Questions and Troubleshooting
    Replies: 2
    Last Post: Thu 28th Dec '06, 3:40pm
  4. Error Number : 1146
    By dilbert in forum vBulletin 3.5 'How Do I' Questions and Troubleshooting
    Replies: 5
    Last Post: Sun 1st Jan '06, 12:22am
  5. mysql error number: 1146 (help me)
    By steppin in forum vBulletin 2 'How Do I' and Troubleshooting
    Replies: 3
    Last Post: Mon 15th Jul '02, 9:30pm

Bookmarks

Posting Permissions

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts