07-14-2017, 03:32 PM
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302
07-14-2017, 04:36 PM
Critical Error SQLSTATE 42S02: Base table or view not found: 1932 Table
SQLSTATE[42S02]: Base table or view not found #485
Closed
ambarishrh opened this Issue Feb 2, 2015 · 8 comments
Comments
Assignees
No one assigned
Labels
not sure if bug
waiting on OP
Projects
None yet
Milestone
No milestone
3 participants
@ambarishrh
@snipe
@scottalanmiller
@ambarishrh
ambarishrh commented Feb 2, 2015
I am getting an error on my installation, but couldn't figure out how to fix it.
[root@snipeit snipeit]# php artisan db:seed
[Illuminate\Database\QueryException]
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'snipeit
_www.assets' doesn't exist (SQL: truncate assets)
db:seed [--class[="..."]] [--database[="..."]]
@snipe
Owner
snipe commented Feb 4, 2015
Looks like your DB configuration is messed up. Can you paste the part in your database.php without the password visible? There shouldn't be any tables called snipeit -
a database perhaps, but not a table.
Also would probably be helpful if you told me what kind of database you're using, and the other info here:
http://docs.snipeitapp.com/installation/..._help.html
@snipe snipe added not sure if bug waiting on OP labels Feb 4, 2015
@snipe
Owner
snipe commented Feb 17, 2015
Scratch that last message. The line breaks confused me and I misread. It looks like it's not seeing your database.php file. Can you make sure your database.php file
lives in app/config/production?
@ambarishrh
ambarishrh commented Feb 18, 2015
I fixed that manually, but will try another installation and see if that
works.
Thanks!
On Wed, Feb 18, 2015 at 1:47 AM, snipe notifications@github.com wrote:
Scratch that last message. The line breaks confused me and I misread. It
looks like it's not seeing your database.php file. Can you make sure your
database.php file lives in app/config/production?
—
Reply to this email directly or view it on GitHub
#485 (comment).
Ambarish.....
http://ambarishrh.com/
snipe closed this Feb 20, 2015
@scottalanmiller
scottalanmiller commented Nov 20, 2015
Just need to run this command to fix the above error:
php artisan app:install
Instructions here:
http://mangolassi.it/topic/6967/installi...nd-mariadb
@snipe
Owner
snipe commented Nov 20, 2015
@scottalanmiller The Snipe-IT documentation covers running the installer pretty thoroughly already. http://docs.snipeitapp.com
@scottalanmiller
scottalanmiller commented Nov 20, 2015
But it was the missing step above. The installation directions are spread over many pages making it easy to miss and this went unanswered. Yes, it is there if you know
to look into specifically the CLI Installation section.
@scottalanmiller
scottalanmiller commented Nov 20, 2015
Here is a user who could not get through the directions this morning. We were making new instructions specific to the OS to ensure that it all worked as intended for
him:
http://mangolassi.it/topic/6965/bloody-l...m-software
@snipe
Owner
snipe commented Nov 20, 2015
@scottalanmiller The step above is just running the CLI installer - there is a whole page dedicated to that. http://docs.snipeitapp.com/installation/...-line.html
If our docs could use improvement, we welcome contributions, but pointing our users to your documentation will only end in tears, as we are constantly updating the
app (and therefore the docs), and your version will almost certainly fall out of sync with what's current.
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'shopstel_magento.core_store' doesn't exist
up vote
2
down vote
favorite
1
Appreciate if anyone could help me out, as I've been searching for a solution for hours, but they are all pretty vague.
When I attempt to access my website receive the following error:
There has been an error processing your request SQLSTATE[42S02]: Base table or view not found: 1146 Table 'shopstel_magento.core_store' doesn't exist Trace:
#0 /home/shopstel/public_html/lib/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/shopstel/public_html/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /home/shopstel/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT main_ta...', Array)
#3 /home/shopstel/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(333): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `main_ta...', Array)
#4 /home/shopstel/public_html/lib/Zend/Db/Adapter/Abstract.php(734): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
#5 /home/shopstel/public_html/lib/Varien/Data/Collection/Db.php(779): Zend_Db_Adapter_Abstract->fetchAll(Object(Varien_Db_Select), Array)
#6 /home/shopstel/public_html/lib/Varien/Data/Collection/Db.php(696): Varien_Data_Collection_Db->_fetchAll(Object(Varien_Db_Select))
#7 /home/shopstel/public_html/lib/Varien/Data/Collection/Db.php(617): Varien_Data_Collection_Db->getData()
#8 /home/shopstel/public_html/app/code/core/Mage/Core/Model/Mysql4/Store/Collection.php(137): Varien_Data_Collection_Db->load(false, false)
#9 /home/shopstel/public_html/lib/Varien/Data/Collection.php(740): Mage_Core_Model_Mysql4_Store_Collection->load()
#10 /home/shopstel/public_html/app/code/core/Mage/Core/Model/App.php(581): Varien_Data_Collection->count()
#11 /home/shopstel/public_html/app/code/core/Mage/Core/Model/App.php(429): Mage_Core_Model_App->_initStores()
#12 /home/shopstel/public_html/app/code/core/Mage/Core/Model/App.php(335): Mage_Core_Model_App->_initCurrentStore('', 'store')
#13 /home/shopstel/public_html/app/Mage.php(627): Mage_Core_Model_App->run(Array)
#14 /home/shopstel/public_html/index.php(80): Mage::run('', 'store')
#15 {main}
After reading many websites, I understand that Magento is trying to grab a table, that does not exist (for some reason). I have not updated/changed my website for a
year or so, and I even asked my host to restore my database to last year, but the error message is still appearing.
I am not an expert at coding, but I can follow specific instructions. Ideally I would like to remove the error without reinstalling Magento. I have read somewhere too
that core_store is a simple table. Someone please help me to solve this problem. Let me know if you need any more information from me. Thank you so much and
appreciate your time!
sql table
shareimprove this question
edited Mar 2 '15 at 20:15
SR_Magento
2,74593984
asked Mar 2 '15 at 19:02
shopstelle
11113
Can you determine the name of the tables in that database that end in store? – Melvyn Mar 2 '15 at 19:50
Sorry how do I go about doing this? I did use the find function for 'core_store' and it gave 0 result. – shopstelle Mar 5 '15 at 17:04
add a comment
3 Answers
active
oldest
votes
up vote
3
down vote
The table you are looking for is a simple table.
When your host restored your database, it sounds like it did not have the core_store table inside of it. Also, it might be that there is a table prefix that might or might
not be at play here.
Try these first:
Check your database to ensure there is a core_store (or variant) table available.
Check to make sure your local.xml config file is pointing to the right database.
Ask your host to restore from another restore point.
Check to ensure your local.xml didn't have a table prefix recently added or removed.
If that does not work, you can always do raw SQL inside your database.
PLEASE NOTE: TEST THIS ON A NON PRODUCTION ENVIRONMENT BEFORE PRODUCTION!
Core Store Table:
CREATE TABLE `core_store` (
`store_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Store Id',
`code` varchar(32) DEFAULT NULL COMMENT 'Code',
`website_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Website Id',
`group_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Group Id',
`name` varchar(255) NOT NULL COMMENT 'Store Name',
`sort_order` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store Sort Order',
`is_active` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store Activity',
PRIMARY KEY (`store_id`),
UNIQUE KEY `UNQ_core_store_CODE` (`code`),
KEY `IDX_core_store_WEBSITE_ID` (`website_id`),
KEY `IDX_core_store_IS_ACTIVE_SORT_ORDER` (`is_active`,`sort_order`),
KEY `IDX_core_store_GROUP_ID` (`group_id`),
CONSTRAINT `FK_core_store_GROUP_ID_core_store_GROUP_GROUP_ID` FOREIGN KEY (`group_id`) REFERENCES `core_store_group` (`group_id`) ON DELETE
CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_core_store_WEBSITE_ID_WBCORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `wbcore_website` (`website_id`) ON DELETE
CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='Stores';
Insert default entries:
INSERT INTO `core_store` VALUES (0,'admin',0,0,'Admin',0,1),(1,'default',1,1,'Default Store View',0,1);
shareimprove this answer
answered Mar 2 '15 at 19:48
Ryan Street
1,760711
I did use the find function for 'core_store' and it gave 0 result, or is there a specific folder I am supposed to look at so I can identify this quicker? My host have restored
it from an earlier database too (2 months earlier), and the website is basically 'empty' with that database. The local.xml file has been untouched for few years. I will try
your raw SQL suggestion with my host and get back to you. Thanks for your help! – shopstelle Mar 5 '15 at 17:08
add a comment
up vote
1
down vote
Something changed. The trick is not to make matters worse by recreating things. Start by checking the folder var/cache below the document root (this is the folder that
has index.php and the app folder. If var/cache exists and has subfolders like mage---*, rename var/cache to var/cache.old. Test if this fixes the issue.
If it doesn't, please specify what tools you have available to interact with the database. For example, does your hoster provide the phpMyadmin tool?
What we know from your report That it is very unlikely that the table is missing, unless you have not visited your site in two months or it has been running on an
external cache and no one has tried to place an order.
That the table definition can be found or is cached in the DDL cache. When Magento queries a database table, it stores the definition of the table in the DDL cache,
meaning Data Definition Language.
That your connection to the database works, or you would have a message about permission to the database being denied, invalid adapter or invalid username /
password combination.
Possible causes
Cache corruption
Corruption of the "ibdata" file, causing MySQL not being able to find the data, while the definition in the ".frm" file is in tact.
Local.xml has changed and it's prefix removed, but the timestamp of the file does not reflect it.
shareimprove this answer
edited Mar 5 '15 at 18:34
answered Mar 5 '15 at 17:58
Melvyn
1,8081423
add a comment
up vote
1
down vote
I can say, that if you have backup of database restore that database please as table core_store table is missing. I am 100% sure issue will get solved.
==========
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table '[database].semaphore' doesn't exist ... in lock_may_be_available()
Last updated 9 June 2012. Created on 13 October 2011.
Edited by shahin1986, Heine. Log in to edit this page.
Symptoms
Accessing the site's URL does not result in a page or a redirect to the installer, but you are greeted by this error instead:
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table '[database].semaphore' doesn't exist: SELECT expire, value FROM {semaphore} WHERE
name = :name; Array ( [:name] => variable_init ) in lock_may_be_available() (line 164 of C:\www\core7\includes\lock.inc).
Causes and Solutions
The ultimate source of this error is that the table semaphore doesn't exist in the database.
Manually edited settings.php before running the installer
Adding the database data to settings.php makes Drupal "believe" it is already installed.
Solution: Do not edit settings.php manually; please follow the steps in INSTALL.txt.
In most cases you cannot rescue the install by visiting install.php, as the installation will now abort with the error
Table variable already exists.
To solve this, discard your manually edited settings.php file, empty the database, then follow the steps in INSTALL.txt.
The database has been emptied or the table semaphore has been removed
Solution: Restore the database from backup.
‹ PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'title' cannot be null
up
PDOException: SQLSTATE[HY000] [2002] Can't connect to local MySQL server ›
Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.
Log in or register to post comments
Comments
mhamed’s picture
the same problem with drupal 7.19
mhamed commented 12 February 2013 at 22:10
the error was caused by the settings.php that i created
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'dbName_semaphore' doesn't exist: SELECT expire, value FROM {semaphore} WHERE name
= :name; Array ( [:name] => variable_init ) in lock_may_be_available() (line 167 of /home/user/public_html/includes/lock.inc).
I deleted it
Refreshed and the installation process started
the installation auto-created the settings.php
larsam
http://larssam.org
facebook
http://www.facebook.com/#!/hmimid
Twitter
https://twitter.com/#!/word_to_say
Gmail
mhamed.hmimid@gmail.com
Skype
mhamed.hmimid
Log in or register to post comments
tkittich’s picture
I ran into the same error. I
tkittich commented 21 March 2013 at 13:33
I ran into the same error. I am using Acquia Dev Desktop and imported a site to a dev machine as localhost7 to be accessed locally as http://localhost7. Somehow in
drupal "sites" directory i got both "default" and "localhost7" directories containing the same set of files. And that confuses drupal. Once I removed "sites/localhost7"
this issue is gone. ^^
Log in or register to post comments
rwilson0429’s picture
I experienced this error
rwilson0429 commented 15 December 2013 at 05:18
I experienced this error after running a script to remove database table prefixes. I fixed it by rerunning the Drupal install script. I simply remove the original
settings.php file and copied the default.settings.php into my sites/default folder as settings.php. Then I visited the site, this caused the install script to run. When
prompted for my database settings, I entered the name of my existing database. The install script will inform you that the database already exists and offer to take you
to your site.
ReggieW
Log in or register to post comments
manumad40’s picture
Check permissions on directories and files
manumad40 commented 7 January 2014 at 04:49
I solved this error assigning correct permissions on a multisite D7 with the "chmod" command to my downloaded files:
Permission 755 to all directories and subdirectories.
Permission 644 to all files into it.
And checking that the user:group is OK in all cases, changing it with the command "chown -R" if necessary.
The subdirectories and files into the "sites/[your_site_name]/files" directory could contain other permissions:
555 or 755 or 775 should be OK for all its subdirectories. Very important: "sites/[your_site_name]/files" subdirectory will be always 775 to allow the system writing
temporary and uploaded files.
664 or 644 to all files inside them.
If you are also running a multisite installation with your sites distributed into different virtual hosts or hosting accounts (i.e.: cPanel/WHM accounts), you will need to
run a copy of all the downloaded common Drupal files to every single site. Linking these files from one vhost to another will break your installation. The "sites" directory
should be the only different structure into each vhost site. Of course, you can use a different database and user for each vhost site.
Log in or register to post comments
Christopher James Francis Rodgers’s picture
[1 Solution] Error: PDOException: SQLSTATE[42S02]: ... semaphore
Christopher James Francis Rodgers commented 7 January 2014 at 07:59
Re: Drupal 7 - Download existing online-webhost site
originally created/maintained by webhost's
free Control-Panel 'automated script service', SimpleScripts;
and Now I am trying to run it locally on my computer
using 'Acquia Dev Desktop'.
===
[Error: (partial)]
PDOException: SQLSTATE[42S02] PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table ... semaphore' doesn't exist
===
[Solution]
In my case, all I had to do was add the line
'prefix' => 'dr_',
to the bottom of the new settings.php file
inside of the new folder created by Acquia Dev Desktop.
That new folder is in [d7-root]/sites/
along with the folders "all" and "default".
[Drupal-7-root]/sites/NEW-ADCP-CREATED-FOLDER/settings.php
Before
///////////////////////////////////////////////////////////////////////
// Please don't edit anything between <@@ADCP_CONF@@> tags //
// This section is autogenerated by Acquia Dev Desktop Control Panel //
///////////////////////////////////////////////////////////////////////
//<@@ADCP_CONF@@>
$base_url = 'http://toltec1:8082';
//D6 DB config
$db_url = 'mysqli://drupaluser@127.0.0.1:33066/toltec1db';
//D7 DB config
$databases = array('default' => array('default' => array(
'driver' => 'mysql',
'database' => 'toltec1db',
'username' => 'drupaluser',
'password' => '',
'host' => '127.0.0.1',
'port' => 33066 )));
//</@@ADCP_CONF@@>
After - Add:
'prefix' => 'dr_',
///////////////////////////////////////////////////////////////////////
// Please don't edit anything between <@@ADCP_CONF@@> tags //
// This section is autogenerated by Acquia Dev Desktop Control Panel //
///////////////////////////////////////////////////////////////////////
//<@@ADCP_CONF@@>
$base_url = 'http://toltec1:8082';
//D6 DB config
$db_url = 'mysqli://drupaluser@127.0.0.1:33066/toltec1db';
//D7 DB config
$databases = array('default' => array('default' => array(
'prefix' => 'dr_',
'driver' => 'mysql',
'database' => 'toltec1db',
'username' => 'drupaluser',
'password' => '',
'host' => '127.0.0.1',
'port' => 33066 )));
//</@@ADCP_CONF@@>
The sites I imported into ADCP (Acquia Dev Desktop Control Panel)
that were giving me the error,
were all sites I had exported from my webhost,
but they were also sites that I originally created
using the webhost's Control Panel free scripting service,
SimpleScripts.
I believe that is how the prefix 'dr_' got involved.
Still, other Drupal websites exported from my online webhost
did install into ADCP perfectly;
but, those were web sites that I manually installed
at my webhost.
Now, I know what to do.
===
After I have downloaded my 'folders/files codebase',
and my 'database dump file' (*.sql) from my webhost,
I 'Import' each website into ADCP.
If on my first attempt to visit my site,
I see the above mentioned error,
then I check that site's old settings.php files:
Old settings.php
[Drupal-7-root]/sites/default/settings.php
If I see the code
'prefix' => 'dr_',
existing in the old settings.php file,
then I add that bit of code to the the bottom
of the new setting.php file
created by a ADCP 'Import':
New: settings.php
[Drupal-7-root]/sites/NEW-ADCP-CREATED-FOLDER/settings.php
~~~ The End. ~~~
===
For help Installing and setting up Acquia Dev Desktop on Windows PC; or MAC
I do recommend the page:
Drupal 7 (or 6) - Install and Setup Acquia Dev Desktop (Formerly DAMP) on your Windows PC or MAC - Video with outline
=== Reference ===
Error
The website encountered an unexpected error. Please try again later.
Error message
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'wbidb.semaphore' doesn't exist: SELECT expire, value FROM {semaphore} WHERE name =
:name; Array ( [:name] => variable_init ) in lock_may_be_available() (line 167 of C:\zzr\ggm\tmp\2014.01.06-d7.24-for_testing-damp_deleting\drp3--webbldi\website-
building-information\includes\lock.inc).
Uncaught exception thrown in shutdown function.
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'wbidb.semaphore' doesn't exist: DELETE FROM {semaphore} WHERE (value =
:db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => 56604783252cacebf8652c8.32192761 ) in lock_release_all() (line 269 of C:\zzr\ggm\tmp
\2014.01.06-d7.24-for_testing-damp_deleting\drp3--webbldi\website-building-information\includes\lock.inc).
===
All the best; intended.
-Chris (great-grandpa.com)
___
"The number one stated objective for Drupal is improving usability." ~Dries Buytaert *
Log in or register to post comments
geogeektress’s picture
OMG Christopher James Francis Rodgers!
geogeektress commented 15 December 2014 at 04:19
If you were standing before me, I would stand right up and kiss you!
I've been trying to solve this problem all night, with this, with that, all sorts of things for 4 hours now. Until, I ran into your solution!
Adding a simple 'prefix' => 'dr_',
along with your before and after example saved the day!
Thank you so much.
DesignerChix
Log in or register to post comments
karolus’s picture
There's Another Way
karolus commented 6 August 2015 at 18:36
Chris--
Thanks for finding the issue--it was a real hassle to figure out before I found this post.
Instead of modifying the Dev Desktop file, though (I tried and it didn't seem to work for me), was to go into phpMyAdmin via Dev Desktop once the DB dump was
imported was to select all tables and edit the prefix to be blank (there is a select to do this). Once this was done, things were good to go.
Log in or register to post comments
justin.wheeler’s picture
AHA!! Thanks!
justin.wheeler commented 7 April 2017 at 13:35
Yes! After days of googling and trying stuff that is apparently outdated this clued me in. Just to spell this out and dumb it down even further - in my case the prefix
wasn't dr_ but something else. I originally setup my site on our hosting provider using Softaculous installer, which assigned the prefix of drpb_ to every table in my SQL
file.
When I transferred to a new hosting account I manually setup a clean drupal install, then imported my database. Well, doing so created a settings.php file without ANY
prefix. My settings.php was looking for tables but essentially had the right city and house number, but the wrong street.
1 - login to phpMyAdmin and find your database
2 - expand the tree and see if there is a prefix in front of your tables. If all of your tables start with xyz_ for example - that's your prefix
3 - Open your settings.php file for editing under sites > default (you may need to open permissions on both the 'default' folder and the 'settings.php' file to make them
writeable.
4 - find the prefix line under your database and username info and enter the correct prefix:
$databases = array (
'default' =>
array (
'default' =>
array (
'database' => 'xxx_xxx',
'username' => 'xxx_xxx',
'password' => 'xxxxxxx',
'host' => 'localhost',
'port' => '',
'driver' => 'mysql',
'prefix' => 'xyz_',
),
),
);
5 - login to site and flush caches
6 - run cron
7 - run updates
Note: after I did all of this I got my site **mostly** back, but there's still something I'm missing. The template is now correct but all of my blocks and views are gone.
Luckily I wasn't too deep into developing the site, but it will still be hours of work to get this back to where it was before the move and I'm not sure what I missed.
Log in or register to post comments
brandonc503’s picture
im using copy of my site
brandonc503 commented 23 September 2015 at 22:48
im using copy of my site files and database dump in Aquia DevDesktop and getting this ..
http://i.imgur.com/uSgLINQ.png
i used someone elses d6 files and db dump and worked perfect. I know thats a big difference but thougth id inlude it. also the Semephore table does exist in source and
cloned db. both empty tables.
Log in or register to post comments
Vishambar’s picture
durpal error
Vishambar commented 14 November 2015 at 08:20
Hi all i am facing below error in durpal 7 during modifying data.
DOException: SQLSTATE[42S02]: Base table or view not found: 1146 La table 'vui.cache_block' n'existe pas: DELETE FROM {cache_block} WHERE (expire <>
:db_condition_placeholder_0) AND (expire < :db_condition_placeholder_1) ; Array ( [:db_condition_placeholder_0] => 0 [:db_condition_placeholder_1] => 1447488989 )
in cache_clear_all() (line 168 of F:\wamp\www\Ventures\includes\cache.inc).
I have tried to add 'prefix' => 'dr_', in setting.php yet error occurring.
Log in or register to post comments
frederickjh’s picture
Check to see if all tables were imported
frederickjh commented 13 October 2016 at 18:34
I ran into this same PDOException: SQLSTATE[42S02]: . . . error message in moving Drupal 7 from one development site to another development site on my laptop.
Upon checking the tables in the Drupal database I found that the full sql dump was not being imported (using Adminer and the "From server" option, adminer.sql). The
last table it imported was the locales_target table.
Link to image of partial sql dump import
Look for Drupal 7 database tables that come near the end of the dump alphabetically like: user*, views*, webform*, workbench*, xmlsitemap* to see if it all imported.
I then used drush sql-cli < database.sql to import the sql dump into the Drupal database after dropping all tables with drush sql-drop.
Link to image of sql dump import that finished
Note: I am linking to the images instead of putting them inline as only images on drupal.org are allowed and there is no way to upload images on these comments.
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'shopstel_magento.core_store' doesn't exist
up vote
2
down vote
favorite
1
Appreciate if anyone could help me out, as I've been searching for a solution for hours, but they are all pretty vague.
When I attempt to access my website receive the following error:
There has been an error processing your request SQLSTATE[42S02]: Base table or view not found: 1146 Table 'shopstel_magento.core_store' doesn't exist Trace:
#0 /home/shopstel/public_html/lib/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/shopstel/public_html/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /home/shopstel/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT main_ta...', Array)
#3 /home/shopstel/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(333): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `main_ta...', Array)
#4 /home/shopstel/public_html/lib/Zend/Db/Adapter/Abstract.php(734): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
#5 /home/shopstel/public_html/lib/Varien/Data/Collection/Db.php(779): Zend_Db_Adapter_Abstract->fetchAll(Object(Varien_Db_Select), Array)
#6 /home/shopstel/public_html/lib/Varien/Data/Collection/Db.php(696): Varien_Data_Collection_Db->_fetchAll(Object(Varien_Db_Select))
#7 /home/shopstel/public_html/lib/Varien/Data/Collection/Db.php(617): Varien_Data_Collection_Db->getData()
#8 /home/shopstel/public_html/app/code/core/Mage/Core/Model/Mysql4/Store/Collection.php(137): Varien_Data_Collection_Db->load(false, false)
#9 /home/shopstel/public_html/lib/Varien/Data/Collection.php(740): Mage_Core_Model_Mysql4_Store_Collection->load()
#10 /home/shopstel/public_html/app/code/core/Mage/Core/Model/App.php(581): Varien_Data_Collection->count()
#11 /home/shopstel/public_html/app/code/core/Mage/Core/Model/App.php(429): Mage_Core_Model_App->_initStores()
#12 /home/shopstel/public_html/app/code/core/Mage/Core/Model/App.php(335): Mage_Core_Model_App->_initCurrentStore('', 'store')
#13 /home/shopstel/public_html/app/Mage.php(627): Mage_Core_Model_App->run(Array)
#14 /home/shopstel/public_html/index.php(80): Mage::run('', 'store')
#15 {main}
After reading many websites, I understand that Magento is trying to grab a table, that does not exist (for some reason). I have not updated/changed my website for a
year or so, and I even asked my host to restore my database to last year, but the error message is still appearing.
I am not an expert at coding, but I can follow specific instructions. Ideally I would like to remove the error without reinstalling Magento. I have read somewhere too
that core_store is a simple table. Someone please help me to solve this problem. Let me know if you need any more information from me. Thank you so much and
appreciate your time!
sql table
shareimprove this question
edited Mar 2 '15 at 20:15
SR_Magento
2,74593984
asked Mar 2 '15 at 19:02
shopstelle
11113
Can you determine the name of the tables in that database that end in store? – Melvyn Mar 2 '15 at 19:50
Sorry how do I go about doing this? I did use the find function for 'core_store' and it gave 0 result. – shopstelle Mar 5 '15 at 17:04
add a comment
3 Answers
active
oldest
votes
up vote
3
down vote
The table you are looking for is a simple table.
When your host restored your database, it sounds like it did not have the core_store table inside of it. Also, it might be that there is a table prefix that might or might
not be at play here.
Try these first:
Check your database to ensure there is a core_store (or variant) table available.
Check to make sure your local.xml config file is pointing to the right database.
Ask your host to restore from another restore point.
Check to ensure your local.xml didn't have a table prefix recently added or removed.
If that does not work, you can always do raw SQL inside your database.
PLEASE NOTE: TEST THIS ON A NON PRODUCTION ENVIRONMENT BEFORE PRODUCTION!
Core Store Table:
CREATE TABLE `core_store` (
`store_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Store Id',
`code` varchar(32) DEFAULT NULL COMMENT 'Code',
`website_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Website Id',
`group_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Group Id',
`name` varchar(255) NOT NULL COMMENT 'Store Name',
`sort_order` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store Sort Order',
`is_active` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store Activity',
PRIMARY KEY (`store_id`),
UNIQUE KEY `UNQ_core_store_CODE` (`code`),
KEY `IDX_core_store_WEBSITE_ID` (`website_id`),
KEY `IDX_core_store_IS_ACTIVE_SORT_ORDER` (`is_active`,`sort_order`),
KEY `IDX_core_store_GROUP_ID` (`group_id`),
CONSTRAINT `FK_core_store_GROUP_ID_core_store_GROUP_GROUP_ID` FOREIGN KEY (`group_id`) REFERENCES `core_store_group` (`group_id`) ON DELETE
CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_core_store_WEBSITE_ID_WBCORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `wbcore_website` (`website_id`) ON DELETE
CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='Stores';
Insert default entries:
INSERT INTO `core_store` VALUES (0,'admin',0,0,'Admin',0,1),(1,'default',1,1,'Default Store View',0,1);
shareimprove this answer
answered Mar 2 '15 at 19:48
Ryan Street
1,760711
I did use the find function for 'core_store' and it gave 0 result, or is there a specific folder I am supposed to look at so I can identify this quicker? My host have restored
it from an earlier database too (2 months earlier), and the website is basically 'empty' with that database. The local.xml file has been untouched for few years. I will try
your raw SQL suggestion with my host and get back to you. Thanks for your help! – shopstelle Mar 5 '15 at 17:08
add a comment
up vote
1
down vote
Something changed. The trick is not to make matters worse by recreating things. Start by checking the folder var/cache below the document root (this is the folder that
has index.php and the app folder. If var/cache exists and has subfolders like mage---*, rename var/cache to var/cache.old. Test if this fixes the issue.
If it doesn't, please specify what tools you have available to interact with the database. For example, does your hoster provide the phpMyadmin tool?
What we know from your report That it is very unlikely that the table is missing, unless you have not visited your site in two months or it has been running on an
external cache and no one has tried to place an order.
That the table definition can be found or is cached in the DDL cache. When Magento queries a database table, it stores the definition of the table in the DDL cache,
meaning Data Definition Language.
That your connection to the database works, or you would have a message about permission to the database being denied, invalid adapter or invalid username /
password combination.
Possible causes
Cache corruption
Corruption of the "ibdata" file, causing MySQL not being able to find the data, while the definition in the ".frm" file is in tact.
Local.xml has changed and it's prefix removed, but the timestamp of the file does not reflect it.
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'cache_rules' doesn't exist
Active
Project:
Rules
Version:
7.x-2.x-dev
Component:
Rules Core
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
alaugh
Created:
20 Dec 2013 at 16:53 UTC
Updated:
22 Jul 2016 at 08:34 UTC
Log in or register to update this issue
Jump to comment: Most recent
After upgrading my sites to D 7.24 (from 7.23) one of them produces an error when trying to clear caches or run update.php. The initial run of update.php after upgrade was not an issue. I discovered the issue several days later when I tried to clear all caches.
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'cache_rules' doesn't exist: TRUNCATE {cache_rules} ; Array ( ) in cache_clear_all() (line 165 of cache.inc).
Comments
tobiasb’s picture
Comment #1
tobiasb CreditAttribution: tobiasb commented 21 January 2014 at 12:45
Project: Drupal core » Rules
Version: 7.24 » 7.x-2.x-dev
Component: cache system » Rules Core
Rules table. ;-)
Log in or register to post comments
alaugh’s picture
Comment #3
alaugh CreditAttribution: alaugh commented 28 January 2014 at 22:16
Status: Active » Closed (fixed)
So I did figure this out… This is actually related directly to the rules module. I went into my sql database. The table "cache_rules" did not appear. Anywhere. But I discovered if I tried to create it, an error "table already exists" error would be returned. So I ran an sql query to delete the table, though it was not visible anywhere in the database. Received a message of success and proceeded to create the table again. All is fine now.
Log in or register to post comments
aeremeev’s picture
Comment #4
aeremeev CreditAttribution: aeremeev commented 29 January 2014 at 22:45
Here is the code which I ran to recreate the broken table:
DROP TABLE XX_cache_rules ;
CREATE TABLE IF NOT EXISTS `XX_cache_rules` (
`cid` varchar(255) NOT NULL DEFAULT '' COMMENT 'Primary Key: Unique cache ID.',
`data` longblob COMMENT 'A collection of data to cache.',
`expire` int(11) NOT NULL DEFAULT '0' COMMENT 'A Unix timestamp indicating when the cache entry should expire, or 0 for never.',
`created` int(11) NOT NULL DEFAULT '0' COMMENT 'A Unix timestamp indicating when the cache entry was created.',
`serialized` smallint(6) NOT NULL DEFAULT '0' COMMENT 'A flag to indicate whether content is serialized (1) or not (0).',
PRIMARY KEY (`cid`),
KEY `expire` (`expire`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Cache table for the rules engine to store configured items.';
Log in or register to post comments
rootical’s picture
Comment #5
rootical CreditAttribution: rootical commented 10 February 2014 at 08:08
Much appreciated!
Log in or register to post comments
texas-bronius’s picture
Comment #6
texas-bronius CreditAttribution: texas-bronius commented 22 March 2014 at 05:34
Thank you @aeremeev: simple and easy copy/paste solution (with removal of XX_ table prefixes) that worked for me.
Log in or register to post comments
marcandreboivin’s picture
Comment #7
marcandreboivin CreditAttribution: marcandreboivin commented 6 May 2014 at 21:27
Thanks Solved it for me too
Log in or register to post comments
jasminedb’s picture
Comment #8
jasminedb CreditAttribution: jasminedb commented 11 June 2014 at 15:58
I had the same problem, and I tried to create the table, but I always get the following message :
#1005 - Can't create table 'ID139639_calico.cache_rules' (errno: -1) ()
I also tried to export the table from my local site and import it into the site online, but that doesn't work either.
I'm sorry, but I don't know much about mysql.
Log in or register to post comments
deggertsen’s picture
Comment #9
deggertsen CreditAttribution: deggertsen commented 6 August 2014 at 16:38
Priority: Critical » Normal
Status: Closed (fixed) » Active
I'm also having problems recreating the table. I get the message: #1005 - Can't create table 'textbook_d7.cache_rules' (errno: -1)
Supports transactions, row-level locking, and foreign keys
Any help?
Log in or register to post comments
oxydog’s picture
Comment #10
oxydog CreditAttribution: oxydog commented 19 August 2014 at 07:47
Thank you aeremeev, that did the trick for me!
I was just wondering: How did you know what the table should look like? Did you check an existing (working) installation?
Log in or register to post comments
niccolox’s picture
Comment #11
niccolox CreditAttribution: niccolox commented 7 October 2014 at 05:43
I used a simpler syntax, but based on #4, big ups for that
I had to actually do this a few times to missing cache_ tables after a mysqldump and migration from one Aegir server to the next
mysql -u root
USE databaseblahblah1
DROP TABLE cache_metatag;
CREATE TABLE IF NOT EXISTS cache_metatag (
cid varchar(255) NOT NULL DEFAULT '',
data longblob,
expire int(11) NOT NULL DEFAULT '0',
created int(11) NOT NULL DEFAULT '0',
serialized smallint(6) NOT NULL DEFAULT '0',
PRIMARY KEY (cid),
KEY expire (expire)
);
Log in or register to post comments
brylie’s picture
Comment #12
brylie CreditAttribution: brylie commented 13 November 2014 at 04:03
Status: Active » Needs review
This is a recurring issue, and affects many sites. It has been documented several times, and is worth investigating the underlying cause.
http://drupal.stackexchange.com/question...-clear-...
https://www.ostraining.com/blog/drupal/b...-database/
http://drupal.stackexchange.com/question...cache-r...
In my case, it seems related to running out of disk space on my /var/ partition, where the databases reside.
Log in or register to post comments
deggertsen’s picture
Comment #13
deggertsen CreditAttribution: deggertsen commented 3 December 2014 at 20:36
Just FYI in case this can help anyone. To solve my problem I had to
1. do a mysql dump of the database and then recreate it under a different name
2. make sure my settings.php file reflects the change in database name
3. Run the following sql
CREATE TABLE IF NOT EXISTS `cache_rules` (
`cid` varchar(255) NOT NULL DEFAULT '' COMMENT 'Primary Key: Unique cache ID.',
`data` longblob COMMENT 'A collection of data to cache.',
`expire` int(11) NOT NULL DEFAULT '0' COMMENT 'A Unix timestamp indicating when the cache entry should expire, or 0 for never.',
`created` int(11) NOT NULL DEFAULT '0' COMMENT 'A Unix timestamp indicating when the cache entry was created.',
`serialized` smallint(6) NOT NULL DEFAULT '0' COMMENT 'A flag to indicate whether content is serialized (1) or not (0).',
PRIMARY KEY (`cid`),
KEY `expire` (`expire`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Cache table for the rules engine to store configured items.';
For some reason it would not allow me to drop and recreate the cache_rules table without completely recreating the database.
Log in or register to post comments
xbrianx’s picture
Comment #14
xbrianx CreditAttribution: xbrianx commented 12 February 2015 at 20:11
I also am getting this error: (errno: -1)
Supports transactions, row-level locking, and foreign keys
i changed the storage type to blackhole and was able to then create the table. I don't know if this really matters or not, but it did the trick and allowed me to update the site.
Log in or register to post comments
mmll’s picture
Comment #15
mmll CreditAttribution: mmll commented 23 February 2015 at 19:29
Same here with erno:-1.
"solved" it with ENGINE=Blackhole
Log in or register to post comments
hmartens@gmail.com’s picture
Comment #16
hmartens@gmail.com CreditAttribution: hmartens@gmail.com commented 1 May 2015 at 19:04
Thanks Aeremeev! #4 worked for me. Just copied and pasted it in phpmyadmin console minus the XX_ part and it fixed the problem ;) I'm forever grateful for your help!!!
Log in or register to post comments
duckx’s picture
Comment #17
duckx CreditAttribution: duckx commented 8 May 2015 at 17:52
#4 worked for me also. MAKE sure you remove the XX_ in the example as i left it in without looking.
Initially #4 didn't work as I still got the error when trying to recreate the table.
I had to do an ENGINE=blackhole and that worked.
What does the engine=blackhole mean? anyone?
Also how can this be prevented? What is the cause of this problem? is it drupal or is it mysql?
Log in or register to post comments
lmeurs’s picture
Comment #18
lmeurs CreditAttribution: lmeurs commented 27 May 2015 at 07:17
Status: Needs review » Active
We also experienced this problem on one of our websites all of a sudden. When trying to recreate the table we experienced the errno: -1 as well. The latter could be circumvented using a different storage engine than InnoDB, but the premise of ENGINE=blackhole does not sound good (see https://dev.mysql.com/doc/refman/5.0/en/...ine.html):
The BLACKHOLE storage engine acts as a “black hole” that accepts data but throws it away and does not store it.
It seems data will not be stored in the cache_rules table and caches will be built over and over again. We could not switch back to InnoDB, but were able to switch to MyISAM.
Corrupted database
I guess the db has become corrupted and some InnoDB dependent orphan files prevent us from switching back to InnoDB. On our CentOS server I assume one of the files is /var/lib/mysql/NAME_OF_DATABASE/cache_rules.ibd.
How to fix the table
We could manually remove this file according to http://dev.mysql.com/doc/refman/5.0/en/i...tml#c9663, but to play safe we chose not to. After we recreated the cache_rules table using MyISAM, we dumped the full db, used this file to create a new db with it and changed the table's storage engine to InnoDB, with success. Now we removed the old db and use the new one.
Bits and pieces
The odd thing is that according to all other issues this always seems to happen to the cache_rules table...
Extensive background info can be found at http://dba.stackexchange.com/questions/6...-table....
And since there is no patch to review, I set the status back to Active.
Log in or register to post comments
deggertsen’s picture
Comment #19
deggertsen CreditAttribution: deggertsen commented 20 May 2015 at 03:08
The real question here is WHAT is causing the cache_rules table to become corrupted when using InnoDB? I have also successfully used MyISAM rather than blackhole, but this still isn't an actual solution.
Log in or register to post comments
duckx’s picture
Comment #20
duckx CreditAttribution: duckx as a volunteer commented 28 May 2015 at 23:48
this happened again to another site. im curious to what is the reason for this to happen so we can stop this from coming up all the time?
Log in or register to post comments
lmeurs’s picture
Comment #21
lmeurs CreditAttribution: lmeurs commented 29 May 2015 at 14:11
Doesn't this smell like a MySQL bug? Whatever the Rules module does with the database, a table should never get corrupted. The server we encountered the problem on runs 5.5.36-cll-lve - MySQL Community Server (GPL) by Atomicorp.
Version info can be found:
by executing SHOW VARIABLES LIKE "%version%"; (more info) or
at phpMyAdmin's home screen.
Corrupted InnoDB tables do not seem to appear seldomly:
https://dev.mysql.com/doc/refman/5.5/en/...overy.html
http://dba.stackexchange.com/questions/4...re-corr...
Log in or register to post comments
deggertsen’s picture
Comment #22
deggertsen CreditAttribution: deggertsen commented 22 June 2015 at 23:05
Seems we're not the only ones having this issue: https://www.drupal.org/node/2097037
Log in or register to post comments
loze’s picture
Comment #23
loze CreditAttribution: loze commented 17 July 2015 at 07:13
I get this too. I can drop and recreate the table but after some time the error comes back and I need to do it again.
Log in or register to post comments
madelyncruz’s picture
Comment #24
madelyncruz CreditAttribution: madelyncruz commented 1 September 2015 at 00:55
#4 worked for me also. Two thumbs up for this. Thank you.
Log in or register to post comments
srikanth.g’s picture
Comment #25
srikanth.g CreditAttribution: srikanth.g commented 24 September 2015 at 11:24
while clearing the cache i got the same error,creating the table manually fixed the issue.Thnx.
Log in or register to post comments
reyna130’s picture
Comment #26
reyna130 CreditAttribution: reyna130 commented 18 October 2015 at 05:19
Hi everyone, I'm super new with all of this and learning as I go...I was hoping someone could help me in locating the phpmyadmin console. I'm trying to add code #4 but am having trouble locating it. It might be super easy, but I'm not sure how. Thanks.
Log in or register to post comments
rwilson0429’s picture
Comment #27
rwilson0429 CreditAttribution: rwilson0429 commented 18 October 2015 at 12:35
Issue summary: View changes
reyna130, if on a local machine, you have to manually install it (I suggest installing it under your website root folder). You may already have it on your Web development stack. If you install it under your web root, you should be able to get to phpmyadmin at localhost\phpmyadmin.
If on a webhosting service, it's normally already installed and you can get to phpmyadmin from cpanels under the databases section (cPanel->PhpMyAdmin). Only local images are allowed.
Log in or register to post comments
jomarocas’s picture
Comment #28
jomarocas CreditAttribution: jomarocas as a volunteer commented 26 November 2015 at 16:25
obviously this worked for me, for clear cache, i dont know how to make this, because i install rules but i dont know why fail if i dont use rules, but this works
DROP TABLE cache_rules ;
CREATE TABLE IF NOT EXISTS `cache_rules` (
`cid` varchar(255) NOT NULL DEFAULT '' COMMENT 'Primary Key: Unique cache ID.',
`data` longblob COMMENT 'A collection of data to cache.',
`expire` int(11) NOT NULL DEFAULT '0' COMMENT 'A Unix timestamp indicating when the cache entry should expire, or 0 for never.',
`created` int(11) NOT NULL DEFAULT '0' COMMENT 'A Unix timestamp indicating when the cache entry was created.',
`serialized` smallint(6) NOT NULL DEFAULT '0' COMMENT 'A flag to indicate whether content is serialized (1) or not (0).',
PRIMARY KEY (`cid`),
KEY `expire` (`expire`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Cache table for the rules engine to store configured items.';
Log in or register to post comments
maxplus’s picture
Comment #29
maxplus CreditAttribution: maxplus commented 14 December 2015 at 09:01
Thanks,
#13 worked for me but I had to create a new db because else I received the tablespace error when recreating the cache_rules table
Log in or register to post comments
Pene’s picture
Comment #30
Pene CreditAttribution: Pene at Cheppers commented 14 December 2015 at 15:10
Related issues: +#2212067: User warning: Table xxx.cache_admin_menu doesn't exist query: UPDATE cache_admin_menu..
Log in or register to post comments
Pene’s picture
Comment #31
Pene CreditAttribution: Pene at Cheppers commented 14 December 2015 at 15:11
Related issues: -#2212067: User warning: Table xxx.cache_admin_menu doesn't exist query: UPDATE cache_admin_menu.. +#2135373: Admin_menu cache breaks 'drush sql-dump'?
Corrected the related issue. The other one is a duplicate.
Log in or register to post comments
FrancescoUK’s picture
Comment #32
FrancescoUK CreditAttribution: FrancescoUK commented 20 December 2015 at 18:19
The way I solved the "(errno: -1)" was to create a table cache_rules_1 following indications from #28 (or #4 which looks the same to me but the XX_ prefix).
You need of course to delete the old table cache_rules as well, so don't rename/remove: DROP TABLE cache_rules ;
Once cache_rules_1 was created I renamed the table to cache_rules.
It went all fine with my case. Not sure what's causing that error or what's causing the table corruption.
P.S.: I did the above from phpMyAdmin. I think I logged off and logged on after having deleted the cache_rules table.
Log in or register to post comments
goose2000’s picture
Comment #33
goose2000 CreditAttribution: goose2000 commented 7 January 2016 at 15:42
Just thought I'd chime in that I just went through this yesterday, a small nervous break down is all. But the #4 fortunately worked for me. Thank you aeremeev and all here, I got my site going again. But would be nice to know how/why this table pukes.
Log in or register to post comments
Antoine Vigneau’s picture
Comment #34
Antoine Vigneau CreditAttribution: Antoine Vigneau commented 11 January 2016 at 18:03
I also had the same issue today on a production site. I did execute what is described in #28, with the additional error when recreating the table
ERROR 1813 (HY000): Tablespace for table '`congress`.`cache_rules`' exists. Please DISCARD the tablespace before IMPORT.
fixed with http://stackoverflow.com/questions/15694...table-x...
It's a bit frustrating to not know the root of this issue.
Log in or register to post comments
besek’s picture
Comment #35
besek CreditAttribution: besek commented 13 January 2016 at 19:27
I've experienced the same issue. Table cache_rules didn't exist and I get:
#1813 - Tablespace for table '`cache_rules`' exists. Please DISCARD the tablespace before IMPORT.
#32 solved the problem and now it seems to be fixed. Although I'd like to unerstand root cause.
Log in or register to post comments
hosais’s picture
Comment #36
hosais CreditAttribution: hosais as a volunteer commented 26 February 2016 at 11:47
I am glad that #4 worked for me. uf...
Log in or register to post comments
supriyarajgopal’s picture
Comment #37
supriyarajgopal CreditAttribution: supriyarajgopal commented 18 April 2016 at 06:32
I was getting the following error while trying to create table as mentioned in #13:
#1813 - Tablespace for table '`cache_rules`' exists. Please DISCARD the tablespace before IMPORT.
I navigated to xampp/mysql/data/ folder and deleted the cache_rules.ibd file.
Then I run the query as in #13 and it worked fine.
Hope this helps someone.
Regards,
Supriya Rajgopal
Log in or register to post comments
jarodms’s picture
Comment #38
jarodms CreditAttribution: jarodms commented 14 July 2016 at 15:10
This is a much larger issue and is not the fault of Rules. It is being addressed in Core: https://www.drupal.org/node/2229013. Even though that's a D8 issue, it still applies for D7.
The solution in #4 works for me too when I get the cache_rules problem, but only temporarily. The next time I Clear Cache (even 10 seconds later), bam it happens again.
If I turn Rules off and Clear Cache, it will happen for another module that uses cache, including Features, Metatag, Libraries.
fyi, I'm running MariaDB 10.1.6
Log in or register to post comments
rees’s picture
Comment #39
rees CreditAttribution: rees as a volunteer commented 22 July 2016 at 08:34
Thanks #5
Log in or register to post comments
morybel’s picture
Comment #40
morybel CreditAttribution: morybel commented 12 January 2017 at 13:29
Thank you so much for this. Much much appreciated.
Log in or register to post comments
benjamin_dk’s picture
Comment #41
benjamin_dk CreditAttribution: benjamin_dk commented 5 April 2017 at 09:50
I got the (error -1) as well when trying to create the table again - using #32 fixed it - code for renaming table:
RENAME TABLE cache_rules_1 TO cache_rule
SQLSTATE[42S02]: Base table or view not found #485
Closed
ambarishrh opened this Issue Feb 2, 2015 · 8 comments
Comments
Assignees
No one assigned
Labels
not sure if bug
waiting on OP
Projects
None yet
Milestone
No milestone
3 participants
@ambarishrh
@snipe
@scottalanmiller
@ambarishrh
ambarishrh commented Feb 2, 2015
I am getting an error on my installation, but couldn't figure out how to fix it.
[root@snipeit snipeit]# php artisan db:seed
[Illuminate\Database\QueryException]
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'snipeit
_www.assets' doesn't exist (SQL: truncate assets)
db:seed [--class[="..."]] [--database[="..."]]
@snipe
Owner
snipe commented Feb 4, 2015
Looks like your DB configuration is messed up. Can you paste the part in your database.php without the password visible? There shouldn't be any tables called snipeit -
a database perhaps, but not a table.
Also would probably be helpful if you told me what kind of database you're using, and the other info here:
http://docs.snipeitapp.com/installation/..._help.html
@snipe snipe added not sure if bug waiting on OP labels Feb 4, 2015
@snipe
Owner
snipe commented Feb 17, 2015
Scratch that last message. The line breaks confused me and I misread. It looks like it's not seeing your database.php file. Can you make sure your database.php file
lives in app/config/production?
@ambarishrh
ambarishrh commented Feb 18, 2015
I fixed that manually, but will try another installation and see if that
works.
Thanks!
On Wed, Feb 18, 2015 at 1:47 AM, snipe notifications@github.com wrote:
Scratch that last message. The line breaks confused me and I misread. It
looks like it's not seeing your database.php file. Can you make sure your
database.php file lives in app/config/production?
—
Reply to this email directly or view it on GitHub
#485 (comment).
Ambarish.....
http://ambarishrh.com/
snipe closed this Feb 20, 2015
@scottalanmiller
scottalanmiller commented Nov 20, 2015
Just need to run this command to fix the above error:
php artisan app:install
Instructions here:
http://mangolassi.it/topic/6967/installi...nd-mariadb
@snipe
Owner
snipe commented Nov 20, 2015
@scottalanmiller The Snipe-IT documentation covers running the installer pretty thoroughly already. http://docs.snipeitapp.com
@scottalanmiller
scottalanmiller commented Nov 20, 2015
But it was the missing step above. The installation directions are spread over many pages making it easy to miss and this went unanswered. Yes, it is there if you know
to look into specifically the CLI Installation section.
@scottalanmiller
scottalanmiller commented Nov 20, 2015
Here is a user who could not get through the directions this morning. We were making new instructions specific to the OS to ensure that it all worked as intended for
him:
http://mangolassi.it/topic/6965/bloody-l...m-software
@snipe
Owner
snipe commented Nov 20, 2015
@scottalanmiller The step above is just running the CLI installer - there is a whole page dedicated to that. http://docs.snipeitapp.com/installation/...-line.html
If our docs could use improvement, we welcome contributions, but pointing our users to your documentation will only end in tears, as we are constantly updating the
app (and therefore the docs), and your version will almost certainly fall out of sync with what's current.
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'shopstel_magento.core_store' doesn't exist
up vote
2
down vote
favorite
1
Appreciate if anyone could help me out, as I've been searching for a solution for hours, but they are all pretty vague.
When I attempt to access my website receive the following error:
There has been an error processing your request SQLSTATE[42S02]: Base table or view not found: 1146 Table 'shopstel_magento.core_store' doesn't exist Trace:
#0 /home/shopstel/public_html/lib/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/shopstel/public_html/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /home/shopstel/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT main_ta...', Array)
#3 /home/shopstel/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(333): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `main_ta...', Array)
#4 /home/shopstel/public_html/lib/Zend/Db/Adapter/Abstract.php(734): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
#5 /home/shopstel/public_html/lib/Varien/Data/Collection/Db.php(779): Zend_Db_Adapter_Abstract->fetchAll(Object(Varien_Db_Select), Array)
#6 /home/shopstel/public_html/lib/Varien/Data/Collection/Db.php(696): Varien_Data_Collection_Db->_fetchAll(Object(Varien_Db_Select))
#7 /home/shopstel/public_html/lib/Varien/Data/Collection/Db.php(617): Varien_Data_Collection_Db->getData()
#8 /home/shopstel/public_html/app/code/core/Mage/Core/Model/Mysql4/Store/Collection.php(137): Varien_Data_Collection_Db->load(false, false)
#9 /home/shopstel/public_html/lib/Varien/Data/Collection.php(740): Mage_Core_Model_Mysql4_Store_Collection->load()
#10 /home/shopstel/public_html/app/code/core/Mage/Core/Model/App.php(581): Varien_Data_Collection->count()
#11 /home/shopstel/public_html/app/code/core/Mage/Core/Model/App.php(429): Mage_Core_Model_App->_initStores()
#12 /home/shopstel/public_html/app/code/core/Mage/Core/Model/App.php(335): Mage_Core_Model_App->_initCurrentStore('', 'store')
#13 /home/shopstel/public_html/app/Mage.php(627): Mage_Core_Model_App->run(Array)
#14 /home/shopstel/public_html/index.php(80): Mage::run('', 'store')
#15 {main}
After reading many websites, I understand that Magento is trying to grab a table, that does not exist (for some reason). I have not updated/changed my website for a
year or so, and I even asked my host to restore my database to last year, but the error message is still appearing.
I am not an expert at coding, but I can follow specific instructions. Ideally I would like to remove the error without reinstalling Magento. I have read somewhere too
that core_store is a simple table. Someone please help me to solve this problem. Let me know if you need any more information from me. Thank you so much and
appreciate your time!
sql table
shareimprove this question
edited Mar 2 '15 at 20:15
SR_Magento
2,74593984
asked Mar 2 '15 at 19:02
shopstelle
11113
Can you determine the name of the tables in that database that end in store? – Melvyn Mar 2 '15 at 19:50
Sorry how do I go about doing this? I did use the find function for 'core_store' and it gave 0 result. – shopstelle Mar 5 '15 at 17:04
add a comment
3 Answers
active
oldest
votes
up vote
3
down vote
The table you are looking for is a simple table.
When your host restored your database, it sounds like it did not have the core_store table inside of it. Also, it might be that there is a table prefix that might or might
not be at play here.
Try these first:
Check your database to ensure there is a core_store (or variant) table available.
Check to make sure your local.xml config file is pointing to the right database.
Ask your host to restore from another restore point.
Check to ensure your local.xml didn't have a table prefix recently added or removed.
If that does not work, you can always do raw SQL inside your database.
PLEASE NOTE: TEST THIS ON A NON PRODUCTION ENVIRONMENT BEFORE PRODUCTION!
Core Store Table:
CREATE TABLE `core_store` (
`store_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Store Id',
`code` varchar(32) DEFAULT NULL COMMENT 'Code',
`website_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Website Id',
`group_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Group Id',
`name` varchar(255) NOT NULL COMMENT 'Store Name',
`sort_order` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store Sort Order',
`is_active` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store Activity',
PRIMARY KEY (`store_id`),
UNIQUE KEY `UNQ_core_store_CODE` (`code`),
KEY `IDX_core_store_WEBSITE_ID` (`website_id`),
KEY `IDX_core_store_IS_ACTIVE_SORT_ORDER` (`is_active`,`sort_order`),
KEY `IDX_core_store_GROUP_ID` (`group_id`),
CONSTRAINT `FK_core_store_GROUP_ID_core_store_GROUP_GROUP_ID` FOREIGN KEY (`group_id`) REFERENCES `core_store_group` (`group_id`) ON DELETE
CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_core_store_WEBSITE_ID_WBCORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `wbcore_website` (`website_id`) ON DELETE
CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='Stores';
Insert default entries:
INSERT INTO `core_store` VALUES (0,'admin',0,0,'Admin',0,1),(1,'default',1,1,'Default Store View',0,1);
shareimprove this answer
answered Mar 2 '15 at 19:48
Ryan Street
1,760711
I did use the find function for 'core_store' and it gave 0 result, or is there a specific folder I am supposed to look at so I can identify this quicker? My host have restored
it from an earlier database too (2 months earlier), and the website is basically 'empty' with that database. The local.xml file has been untouched for few years. I will try
your raw SQL suggestion with my host and get back to you. Thanks for your help! – shopstelle Mar 5 '15 at 17:08
add a comment
up vote
1
down vote
Something changed. The trick is not to make matters worse by recreating things. Start by checking the folder var/cache below the document root (this is the folder that
has index.php and the app folder. If var/cache exists and has subfolders like mage---*, rename var/cache to var/cache.old. Test if this fixes the issue.
If it doesn't, please specify what tools you have available to interact with the database. For example, does your hoster provide the phpMyadmin tool?
What we know from your report That it is very unlikely that the table is missing, unless you have not visited your site in two months or it has been running on an
external cache and no one has tried to place an order.
That the table definition can be found or is cached in the DDL cache. When Magento queries a database table, it stores the definition of the table in the DDL cache,
meaning Data Definition Language.
That your connection to the database works, or you would have a message about permission to the database being denied, invalid adapter or invalid username /
password combination.
Possible causes
Cache corruption
Corruption of the "ibdata" file, causing MySQL not being able to find the data, while the definition in the ".frm" file is in tact.
Local.xml has changed and it's prefix removed, but the timestamp of the file does not reflect it.
shareimprove this answer
edited Mar 5 '15 at 18:34
answered Mar 5 '15 at 17:58
Melvyn
1,8081423
add a comment
up vote
1
down vote
I can say, that if you have backup of database restore that database please as table core_store table is missing. I am 100% sure issue will get solved.
==========
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table '[database].semaphore' doesn't exist ... in lock_may_be_available()
Last updated 9 June 2012. Created on 13 October 2011.
Edited by shahin1986, Heine. Log in to edit this page.
Symptoms
Accessing the site's URL does not result in a page or a redirect to the installer, but you are greeted by this error instead:
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table '[database].semaphore' doesn't exist: SELECT expire, value FROM {semaphore} WHERE
name = :name; Array ( [:name] => variable_init ) in lock_may_be_available() (line 164 of C:\www\core7\includes\lock.inc).
Causes and Solutions
The ultimate source of this error is that the table semaphore doesn't exist in the database.
Manually edited settings.php before running the installer
Adding the database data to settings.php makes Drupal "believe" it is already installed.
Solution: Do not edit settings.php manually; please follow the steps in INSTALL.txt.
In most cases you cannot rescue the install by visiting install.php, as the installation will now abort with the error
Table variable already exists.
To solve this, discard your manually edited settings.php file, empty the database, then follow the steps in INSTALL.txt.
The database has been emptied or the table semaphore has been removed
Solution: Restore the database from backup.
‹ PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'title' cannot be null
up
PDOException: SQLSTATE[HY000] [2002] Can't connect to local MySQL server ›
Looking for support? Visit the Drupal.org forums, or join #drupal-support in IRC.
Log in or register to post comments
Comments
mhamed’s picture
the same problem with drupal 7.19
mhamed commented 12 February 2013 at 22:10
the error was caused by the settings.php that i created
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'dbName_semaphore' doesn't exist: SELECT expire, value FROM {semaphore} WHERE name
= :name; Array ( [:name] => variable_init ) in lock_may_be_available() (line 167 of /home/user/public_html/includes/lock.inc).
I deleted it
Refreshed and the installation process started
the installation auto-created the settings.php
larsam
http://larssam.org
http://www.facebook.com/#!/hmimid
https://twitter.com/#!/word_to_say
Gmail
mhamed.hmimid@gmail.com
Skype
mhamed.hmimid
Log in or register to post comments
tkittich’s picture
I ran into the same error. I
tkittich commented 21 March 2013 at 13:33
I ran into the same error. I am using Acquia Dev Desktop and imported a site to a dev machine as localhost7 to be accessed locally as http://localhost7. Somehow in
drupal "sites" directory i got both "default" and "localhost7" directories containing the same set of files. And that confuses drupal. Once I removed "sites/localhost7"
this issue is gone. ^^
Log in or register to post comments
rwilson0429’s picture
I experienced this error
rwilson0429 commented 15 December 2013 at 05:18
I experienced this error after running a script to remove database table prefixes. I fixed it by rerunning the Drupal install script. I simply remove the original
settings.php file and copied the default.settings.php into my sites/default folder as settings.php. Then I visited the site, this caused the install script to run. When
prompted for my database settings, I entered the name of my existing database. The install script will inform you that the database already exists and offer to take you
to your site.
ReggieW
Log in or register to post comments
manumad40’s picture
Check permissions on directories and files
manumad40 commented 7 January 2014 at 04:49
I solved this error assigning correct permissions on a multisite D7 with the "chmod" command to my downloaded files:
Permission 755 to all directories and subdirectories.
Permission 644 to all files into it.
And checking that the user:group is OK in all cases, changing it with the command "chown -R" if necessary.
The subdirectories and files into the "sites/[your_site_name]/files" directory could contain other permissions:
555 or 755 or 775 should be OK for all its subdirectories. Very important: "sites/[your_site_name]/files" subdirectory will be always 775 to allow the system writing
temporary and uploaded files.
664 or 644 to all files inside them.
If you are also running a multisite installation with your sites distributed into different virtual hosts or hosting accounts (i.e.: cPanel/WHM accounts), you will need to
run a copy of all the downloaded common Drupal files to every single site. Linking these files from one vhost to another will break your installation. The "sites" directory
should be the only different structure into each vhost site. Of course, you can use a different database and user for each vhost site.
Log in or register to post comments
Christopher James Francis Rodgers’s picture
[1 Solution] Error: PDOException: SQLSTATE[42S02]: ... semaphore
Christopher James Francis Rodgers commented 7 January 2014 at 07:59
Re: Drupal 7 - Download existing online-webhost site
originally created/maintained by webhost's
free Control-Panel 'automated script service', SimpleScripts;
and Now I am trying to run it locally on my computer
using 'Acquia Dev Desktop'.
===
[Error: (partial)]
PDOException: SQLSTATE[42S02] PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table ... semaphore' doesn't exist
===
[Solution]
In my case, all I had to do was add the line
'prefix' => 'dr_',
to the bottom of the new settings.php file
inside of the new folder created by Acquia Dev Desktop.
That new folder is in [d7-root]/sites/
along with the folders "all" and "default".
[Drupal-7-root]/sites/NEW-ADCP-CREATED-FOLDER/settings.php
Before
///////////////////////////////////////////////////////////////////////
// Please don't edit anything between <@@ADCP_CONF@@> tags //
// This section is autogenerated by Acquia Dev Desktop Control Panel //
///////////////////////////////////////////////////////////////////////
//<@@ADCP_CONF@@>
$base_url = 'http://toltec1:8082';
//D6 DB config
$db_url = 'mysqli://drupaluser@127.0.0.1:33066/toltec1db';
//D7 DB config
$databases = array('default' => array('default' => array(
'driver' => 'mysql',
'database' => 'toltec1db',
'username' => 'drupaluser',
'password' => '',
'host' => '127.0.0.1',
'port' => 33066 )));
//</@@ADCP_CONF@@>
After - Add:
'prefix' => 'dr_',
///////////////////////////////////////////////////////////////////////
// Please don't edit anything between <@@ADCP_CONF@@> tags //
// This section is autogenerated by Acquia Dev Desktop Control Panel //
///////////////////////////////////////////////////////////////////////
//<@@ADCP_CONF@@>
$base_url = 'http://toltec1:8082';
//D6 DB config
$db_url = 'mysqli://drupaluser@127.0.0.1:33066/toltec1db';
//D7 DB config
$databases = array('default' => array('default' => array(
'prefix' => 'dr_',
'driver' => 'mysql',
'database' => 'toltec1db',
'username' => 'drupaluser',
'password' => '',
'host' => '127.0.0.1',
'port' => 33066 )));
//</@@ADCP_CONF@@>
The sites I imported into ADCP (Acquia Dev Desktop Control Panel)
that were giving me the error,
were all sites I had exported from my webhost,
but they were also sites that I originally created
using the webhost's Control Panel free scripting service,
SimpleScripts.
I believe that is how the prefix 'dr_' got involved.
Still, other Drupal websites exported from my online webhost
did install into ADCP perfectly;
but, those were web sites that I manually installed
at my webhost.
Now, I know what to do.
===
After I have downloaded my 'folders/files codebase',
and my 'database dump file' (*.sql) from my webhost,
I 'Import' each website into ADCP.
If on my first attempt to visit my site,
I see the above mentioned error,
then I check that site's old settings.php files:
Old settings.php
[Drupal-7-root]/sites/default/settings.php
If I see the code
'prefix' => 'dr_',
existing in the old settings.php file,
then I add that bit of code to the the bottom
of the new setting.php file
created by a ADCP 'Import':
New: settings.php
[Drupal-7-root]/sites/NEW-ADCP-CREATED-FOLDER/settings.php
~~~ The End. ~~~
===
For help Installing and setting up Acquia Dev Desktop on Windows PC; or MAC
I do recommend the page:
Drupal 7 (or 6) - Install and Setup Acquia Dev Desktop (Formerly DAMP) on your Windows PC or MAC - Video with outline
=== Reference ===
Error
The website encountered an unexpected error. Please try again later.
Error message
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'wbidb.semaphore' doesn't exist: SELECT expire, value FROM {semaphore} WHERE name =
:name; Array ( [:name] => variable_init ) in lock_may_be_available() (line 167 of C:\zzr\ggm\tmp\2014.01.06-d7.24-for_testing-damp_deleting\drp3--webbldi\website-
building-information\includes\lock.inc).
Uncaught exception thrown in shutdown function.
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'wbidb.semaphore' doesn't exist: DELETE FROM {semaphore} WHERE (value =
:db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => 56604783252cacebf8652c8.32192761 ) in lock_release_all() (line 269 of C:\zzr\ggm\tmp
\2014.01.06-d7.24-for_testing-damp_deleting\drp3--webbldi\website-building-information\includes\lock.inc).
===
All the best; intended.
-Chris (great-grandpa.com)
___
"The number one stated objective for Drupal is improving usability." ~Dries Buytaert *
Log in or register to post comments
geogeektress’s picture
OMG Christopher James Francis Rodgers!
geogeektress commented 15 December 2014 at 04:19
If you were standing before me, I would stand right up and kiss you!
I've been trying to solve this problem all night, with this, with that, all sorts of things for 4 hours now. Until, I ran into your solution!
Adding a simple 'prefix' => 'dr_',
along with your before and after example saved the day!
Thank you so much.
DesignerChix
Log in or register to post comments
karolus’s picture
There's Another Way
karolus commented 6 August 2015 at 18:36
Chris--
Thanks for finding the issue--it was a real hassle to figure out before I found this post.
Instead of modifying the Dev Desktop file, though (I tried and it didn't seem to work for me), was to go into phpMyAdmin via Dev Desktop once the DB dump was
imported was to select all tables and edit the prefix to be blank (there is a select to do this). Once this was done, things were good to go.
Log in or register to post comments
justin.wheeler’s picture
AHA!! Thanks!
justin.wheeler commented 7 April 2017 at 13:35
Yes! After days of googling and trying stuff that is apparently outdated this clued me in. Just to spell this out and dumb it down even further - in my case the prefix
wasn't dr_ but something else. I originally setup my site on our hosting provider using Softaculous installer, which assigned the prefix of drpb_ to every table in my SQL
file.
When I transferred to a new hosting account I manually setup a clean drupal install, then imported my database. Well, doing so created a settings.php file without ANY
prefix. My settings.php was looking for tables but essentially had the right city and house number, but the wrong street.
1 - login to phpMyAdmin and find your database
2 - expand the tree and see if there is a prefix in front of your tables. If all of your tables start with xyz_ for example - that's your prefix
3 - Open your settings.php file for editing under sites > default (you may need to open permissions on both the 'default' folder and the 'settings.php' file to make them
writeable.
4 - find the prefix line under your database and username info and enter the correct prefix:
$databases = array (
'default' =>
array (
'default' =>
array (
'database' => 'xxx_xxx',
'username' => 'xxx_xxx',
'password' => 'xxxxxxx',
'host' => 'localhost',
'port' => '',
'driver' => 'mysql',
'prefix' => 'xyz_',
),
),
);
5 - login to site and flush caches
6 - run cron
7 - run updates
Note: after I did all of this I got my site **mostly** back, but there's still something I'm missing. The template is now correct but all of my blocks and views are gone.
Luckily I wasn't too deep into developing the site, but it will still be hours of work to get this back to where it was before the move and I'm not sure what I missed.
Log in or register to post comments
brandonc503’s picture
im using copy of my site
brandonc503 commented 23 September 2015 at 22:48
im using copy of my site files and database dump in Aquia DevDesktop and getting this ..
http://i.imgur.com/uSgLINQ.png
i used someone elses d6 files and db dump and worked perfect. I know thats a big difference but thougth id inlude it. also the Semephore table does exist in source and
cloned db. both empty tables.
Log in or register to post comments
Vishambar’s picture
durpal error
Vishambar commented 14 November 2015 at 08:20
Hi all i am facing below error in durpal 7 during modifying data.
DOException: SQLSTATE[42S02]: Base table or view not found: 1146 La table 'vui.cache_block' n'existe pas: DELETE FROM {cache_block} WHERE (expire <>
:db_condition_placeholder_0) AND (expire < :db_condition_placeholder_1) ; Array ( [:db_condition_placeholder_0] => 0 [:db_condition_placeholder_1] => 1447488989 )
in cache_clear_all() (line 168 of F:\wamp\www\Ventures\includes\cache.inc).
I have tried to add 'prefix' => 'dr_', in setting.php yet error occurring.
Log in or register to post comments
frederickjh’s picture
Check to see if all tables were imported
frederickjh commented 13 October 2016 at 18:34
I ran into this same PDOException: SQLSTATE[42S02]: . . . error message in moving Drupal 7 from one development site to another development site on my laptop.
Upon checking the tables in the Drupal database I found that the full sql dump was not being imported (using Adminer and the "From server" option, adminer.sql). The
last table it imported was the locales_target table.
Link to image of partial sql dump import
Look for Drupal 7 database tables that come near the end of the dump alphabetically like: user*, views*, webform*, workbench*, xmlsitemap* to see if it all imported.
I then used drush sql-cli < database.sql to import the sql dump into the Drupal database after dropping all tables with drush sql-drop.
Link to image of sql dump import that finished
Note: I am linking to the images instead of putting them inline as only images on drupal.org are allowed and there is no way to upload images on these comments.
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'shopstel_magento.core_store' doesn't exist
up vote
2
down vote
favorite
1
Appreciate if anyone could help me out, as I've been searching for a solution for hours, but they are all pretty vague.
When I attempt to access my website receive the following error:
There has been an error processing your request SQLSTATE[42S02]: Base table or view not found: 1146 Table 'shopstel_magento.core_store' doesn't exist Trace:
#0 /home/shopstel/public_html/lib/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)
#1 /home/shopstel/public_html/lib/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /home/shopstel/public_html/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('SELECT main_ta...', Array)
#3 /home/shopstel/public_html/lib/Varien/Db/Adapter/Pdo/Mysql.php(333): Zend_Db_Adapter_Pdo_Abstract->query('SELECT `main_ta...', Array)
#4 /home/shopstel/public_html/lib/Zend/Db/Adapter/Abstract.php(734): Varien_Db_Adapter_Pdo_Mysql->query(Object(Varien_Db_Select), Array)
#5 /home/shopstel/public_html/lib/Varien/Data/Collection/Db.php(779): Zend_Db_Adapter_Abstract->fetchAll(Object(Varien_Db_Select), Array)
#6 /home/shopstel/public_html/lib/Varien/Data/Collection/Db.php(696): Varien_Data_Collection_Db->_fetchAll(Object(Varien_Db_Select))
#7 /home/shopstel/public_html/lib/Varien/Data/Collection/Db.php(617): Varien_Data_Collection_Db->getData()
#8 /home/shopstel/public_html/app/code/core/Mage/Core/Model/Mysql4/Store/Collection.php(137): Varien_Data_Collection_Db->load(false, false)
#9 /home/shopstel/public_html/lib/Varien/Data/Collection.php(740): Mage_Core_Model_Mysql4_Store_Collection->load()
#10 /home/shopstel/public_html/app/code/core/Mage/Core/Model/App.php(581): Varien_Data_Collection->count()
#11 /home/shopstel/public_html/app/code/core/Mage/Core/Model/App.php(429): Mage_Core_Model_App->_initStores()
#12 /home/shopstel/public_html/app/code/core/Mage/Core/Model/App.php(335): Mage_Core_Model_App->_initCurrentStore('', 'store')
#13 /home/shopstel/public_html/app/Mage.php(627): Mage_Core_Model_App->run(Array)
#14 /home/shopstel/public_html/index.php(80): Mage::run('', 'store')
#15 {main}
After reading many websites, I understand that Magento is trying to grab a table, that does not exist (for some reason). I have not updated/changed my website for a
year or so, and I even asked my host to restore my database to last year, but the error message is still appearing.
I am not an expert at coding, but I can follow specific instructions. Ideally I would like to remove the error without reinstalling Magento. I have read somewhere too
that core_store is a simple table. Someone please help me to solve this problem. Let me know if you need any more information from me. Thank you so much and
appreciate your time!
sql table
shareimprove this question
edited Mar 2 '15 at 20:15
SR_Magento
2,74593984
asked Mar 2 '15 at 19:02
shopstelle
11113
Can you determine the name of the tables in that database that end in store? – Melvyn Mar 2 '15 at 19:50
Sorry how do I go about doing this? I did use the find function for 'core_store' and it gave 0 result. – shopstelle Mar 5 '15 at 17:04
add a comment
3 Answers
active
oldest
votes
up vote
3
down vote
The table you are looking for is a simple table.
When your host restored your database, it sounds like it did not have the core_store table inside of it. Also, it might be that there is a table prefix that might or might
not be at play here.
Try these first:
Check your database to ensure there is a core_store (or variant) table available.
Check to make sure your local.xml config file is pointing to the right database.
Ask your host to restore from another restore point.
Check to ensure your local.xml didn't have a table prefix recently added or removed.
If that does not work, you can always do raw SQL inside your database.
PLEASE NOTE: TEST THIS ON A NON PRODUCTION ENVIRONMENT BEFORE PRODUCTION!
Core Store Table:
CREATE TABLE `core_store` (
`store_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Store Id',
`code` varchar(32) DEFAULT NULL COMMENT 'Code',
`website_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Website Id',
`group_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Group Id',
`name` varchar(255) NOT NULL COMMENT 'Store Name',
`sort_order` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store Sort Order',
`is_active` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store Activity',
PRIMARY KEY (`store_id`),
UNIQUE KEY `UNQ_core_store_CODE` (`code`),
KEY `IDX_core_store_WEBSITE_ID` (`website_id`),
KEY `IDX_core_store_IS_ACTIVE_SORT_ORDER` (`is_active`,`sort_order`),
KEY `IDX_core_store_GROUP_ID` (`group_id`),
CONSTRAINT `FK_core_store_GROUP_ID_core_store_GROUP_GROUP_ID` FOREIGN KEY (`group_id`) REFERENCES `core_store_group` (`group_id`) ON DELETE
CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_core_store_WEBSITE_ID_WBCORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `wbcore_website` (`website_id`) ON DELETE
CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='Stores';
Insert default entries:
INSERT INTO `core_store` VALUES (0,'admin',0,0,'Admin',0,1),(1,'default',1,1,'Default Store View',0,1);
shareimprove this answer
answered Mar 2 '15 at 19:48
Ryan Street
1,760711
I did use the find function for 'core_store' and it gave 0 result, or is there a specific folder I am supposed to look at so I can identify this quicker? My host have restored
it from an earlier database too (2 months earlier), and the website is basically 'empty' with that database. The local.xml file has been untouched for few years. I will try
your raw SQL suggestion with my host and get back to you. Thanks for your help! – shopstelle Mar 5 '15 at 17:08
add a comment
up vote
1
down vote
Something changed. The trick is not to make matters worse by recreating things. Start by checking the folder var/cache below the document root (this is the folder that
has index.php and the app folder. If var/cache exists and has subfolders like mage---*, rename var/cache to var/cache.old. Test if this fixes the issue.
If it doesn't, please specify what tools you have available to interact with the database. For example, does your hoster provide the phpMyadmin tool?
What we know from your report That it is very unlikely that the table is missing, unless you have not visited your site in two months or it has been running on an
external cache and no one has tried to place an order.
That the table definition can be found or is cached in the DDL cache. When Magento queries a database table, it stores the definition of the table in the DDL cache,
meaning Data Definition Language.
That your connection to the database works, or you would have a message about permission to the database being denied, invalid adapter or invalid username /
password combination.
Possible causes
Cache corruption
Corruption of the "ibdata" file, causing MySQL not being able to find the data, while the definition in the ".frm" file is in tact.
Local.xml has changed and it's prefix removed, but the timestamp of the file does not reflect it.
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'cache_rules' doesn't exist
Active
Project:
Rules
Version:
7.x-2.x-dev
Component:
Rules Core
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
alaugh
Created:
20 Dec 2013 at 16:53 UTC
Updated:
22 Jul 2016 at 08:34 UTC
Log in or register to update this issue
Jump to comment: Most recent
After upgrading my sites to D 7.24 (from 7.23) one of them produces an error when trying to clear caches or run update.php. The initial run of update.php after upgrade was not an issue. I discovered the issue several days later when I tried to clear all caches.
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'cache_rules' doesn't exist: TRUNCATE {cache_rules} ; Array ( ) in cache_clear_all() (line 165 of cache.inc).
Comments
tobiasb’s picture
Comment #1
tobiasb CreditAttribution: tobiasb commented 21 January 2014 at 12:45
Project: Drupal core » Rules
Version: 7.24 » 7.x-2.x-dev
Component: cache system » Rules Core
Rules table. ;-)
Log in or register to post comments
alaugh’s picture
Comment #3
alaugh CreditAttribution: alaugh commented 28 January 2014 at 22:16
Status: Active » Closed (fixed)
So I did figure this out… This is actually related directly to the rules module. I went into my sql database. The table "cache_rules" did not appear. Anywhere. But I discovered if I tried to create it, an error "table already exists" error would be returned. So I ran an sql query to delete the table, though it was not visible anywhere in the database. Received a message of success and proceeded to create the table again. All is fine now.
Log in or register to post comments
aeremeev’s picture
Comment #4
aeremeev CreditAttribution: aeremeev commented 29 January 2014 at 22:45
Here is the code which I ran to recreate the broken table:
DROP TABLE XX_cache_rules ;
CREATE TABLE IF NOT EXISTS `XX_cache_rules` (
`cid` varchar(255) NOT NULL DEFAULT '' COMMENT 'Primary Key: Unique cache ID.',
`data` longblob COMMENT 'A collection of data to cache.',
`expire` int(11) NOT NULL DEFAULT '0' COMMENT 'A Unix timestamp indicating when the cache entry should expire, or 0 for never.',
`created` int(11) NOT NULL DEFAULT '0' COMMENT 'A Unix timestamp indicating when the cache entry was created.',
`serialized` smallint(6) NOT NULL DEFAULT '0' COMMENT 'A flag to indicate whether content is serialized (1) or not (0).',
PRIMARY KEY (`cid`),
KEY `expire` (`expire`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Cache table for the rules engine to store configured items.';
Log in or register to post comments
rootical’s picture
Comment #5
rootical CreditAttribution: rootical commented 10 February 2014 at 08:08
Much appreciated!
Log in or register to post comments
texas-bronius’s picture
Comment #6
texas-bronius CreditAttribution: texas-bronius commented 22 March 2014 at 05:34
Thank you @aeremeev: simple and easy copy/paste solution (with removal of XX_ table prefixes) that worked for me.
Log in or register to post comments
marcandreboivin’s picture
Comment #7
marcandreboivin CreditAttribution: marcandreboivin commented 6 May 2014 at 21:27
Thanks Solved it for me too
Log in or register to post comments
jasminedb’s picture
Comment #8
jasminedb CreditAttribution: jasminedb commented 11 June 2014 at 15:58
I had the same problem, and I tried to create the table, but I always get the following message :
#1005 - Can't create table 'ID139639_calico.cache_rules' (errno: -1) ()
I also tried to export the table from my local site and import it into the site online, but that doesn't work either.
I'm sorry, but I don't know much about mysql.
Log in or register to post comments
deggertsen’s picture
Comment #9
deggertsen CreditAttribution: deggertsen commented 6 August 2014 at 16:38
Priority: Critical » Normal
Status: Closed (fixed) » Active
I'm also having problems recreating the table. I get the message: #1005 - Can't create table 'textbook_d7.cache_rules' (errno: -1)
Supports transactions, row-level locking, and foreign keys
Any help?
Log in or register to post comments
oxydog’s picture
Comment #10
oxydog CreditAttribution: oxydog commented 19 August 2014 at 07:47
Thank you aeremeev, that did the trick for me!
I was just wondering: How did you know what the table should look like? Did you check an existing (working) installation?
Log in or register to post comments
niccolox’s picture
Comment #11
niccolox CreditAttribution: niccolox commented 7 October 2014 at 05:43
I used a simpler syntax, but based on #4, big ups for that
I had to actually do this a few times to missing cache_ tables after a mysqldump and migration from one Aegir server to the next
mysql -u root
USE databaseblahblah1
DROP TABLE cache_metatag;
CREATE TABLE IF NOT EXISTS cache_metatag (
cid varchar(255) NOT NULL DEFAULT '',
data longblob,
expire int(11) NOT NULL DEFAULT '0',
created int(11) NOT NULL DEFAULT '0',
serialized smallint(6) NOT NULL DEFAULT '0',
PRIMARY KEY (cid),
KEY expire (expire)
);
Log in or register to post comments
brylie’s picture
Comment #12
brylie CreditAttribution: brylie commented 13 November 2014 at 04:03
Status: Active » Needs review
This is a recurring issue, and affects many sites. It has been documented several times, and is worth investigating the underlying cause.
http://drupal.stackexchange.com/question...-clear-...
https://www.ostraining.com/blog/drupal/b...-database/
http://drupal.stackexchange.com/question...cache-r...
In my case, it seems related to running out of disk space on my /var/ partition, where the databases reside.
Log in or register to post comments
deggertsen’s picture
Comment #13
deggertsen CreditAttribution: deggertsen commented 3 December 2014 at 20:36
Just FYI in case this can help anyone. To solve my problem I had to
1. do a mysql dump of the database and then recreate it under a different name
2. make sure my settings.php file reflects the change in database name
3. Run the following sql
CREATE TABLE IF NOT EXISTS `cache_rules` (
`cid` varchar(255) NOT NULL DEFAULT '' COMMENT 'Primary Key: Unique cache ID.',
`data` longblob COMMENT 'A collection of data to cache.',
`expire` int(11) NOT NULL DEFAULT '0' COMMENT 'A Unix timestamp indicating when the cache entry should expire, or 0 for never.',
`created` int(11) NOT NULL DEFAULT '0' COMMENT 'A Unix timestamp indicating when the cache entry was created.',
`serialized` smallint(6) NOT NULL DEFAULT '0' COMMENT 'A flag to indicate whether content is serialized (1) or not (0).',
PRIMARY KEY (`cid`),
KEY `expire` (`expire`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Cache table for the rules engine to store configured items.';
For some reason it would not allow me to drop and recreate the cache_rules table without completely recreating the database.
Log in or register to post comments
xbrianx’s picture
Comment #14
xbrianx CreditAttribution: xbrianx commented 12 February 2015 at 20:11
I also am getting this error: (errno: -1)
Supports transactions, row-level locking, and foreign keys
i changed the storage type to blackhole and was able to then create the table. I don't know if this really matters or not, but it did the trick and allowed me to update the site.
Log in or register to post comments
mmll’s picture
Comment #15
mmll CreditAttribution: mmll commented 23 February 2015 at 19:29
Same here with erno:-1.
"solved" it with ENGINE=Blackhole
Log in or register to post comments
hmartens@gmail.com’s picture
Comment #16
hmartens@gmail.com CreditAttribution: hmartens@gmail.com commented 1 May 2015 at 19:04
Thanks Aeremeev! #4 worked for me. Just copied and pasted it in phpmyadmin console minus the XX_ part and it fixed the problem ;) I'm forever grateful for your help!!!
Log in or register to post comments
duckx’s picture
Comment #17
duckx CreditAttribution: duckx commented 8 May 2015 at 17:52
#4 worked for me also. MAKE sure you remove the XX_ in the example as i left it in without looking.
Initially #4 didn't work as I still got the error when trying to recreate the table.
I had to do an ENGINE=blackhole and that worked.
What does the engine=blackhole mean? anyone?
Also how can this be prevented? What is the cause of this problem? is it drupal or is it mysql?
Log in or register to post comments
lmeurs’s picture
Comment #18
lmeurs CreditAttribution: lmeurs commented 27 May 2015 at 07:17
Status: Needs review » Active
We also experienced this problem on one of our websites all of a sudden. When trying to recreate the table we experienced the errno: -1 as well. The latter could be circumvented using a different storage engine than InnoDB, but the premise of ENGINE=blackhole does not sound good (see https://dev.mysql.com/doc/refman/5.0/en/...ine.html):
The BLACKHOLE storage engine acts as a “black hole” that accepts data but throws it away and does not store it.
It seems data will not be stored in the cache_rules table and caches will be built over and over again. We could not switch back to InnoDB, but were able to switch to MyISAM.
Corrupted database
I guess the db has become corrupted and some InnoDB dependent orphan files prevent us from switching back to InnoDB. On our CentOS server I assume one of the files is /var/lib/mysql/NAME_OF_DATABASE/cache_rules.ibd.
How to fix the table
We could manually remove this file according to http://dev.mysql.com/doc/refman/5.0/en/i...tml#c9663, but to play safe we chose not to. After we recreated the cache_rules table using MyISAM, we dumped the full db, used this file to create a new db with it and changed the table's storage engine to InnoDB, with success. Now we removed the old db and use the new one.
Bits and pieces
The odd thing is that according to all other issues this always seems to happen to the cache_rules table...
Extensive background info can be found at http://dba.stackexchange.com/questions/6...-table....
And since there is no patch to review, I set the status back to Active.
Log in or register to post comments
deggertsen’s picture
Comment #19
deggertsen CreditAttribution: deggertsen commented 20 May 2015 at 03:08
The real question here is WHAT is causing the cache_rules table to become corrupted when using InnoDB? I have also successfully used MyISAM rather than blackhole, but this still isn't an actual solution.
Log in or register to post comments
duckx’s picture
Comment #20
duckx CreditAttribution: duckx as a volunteer commented 28 May 2015 at 23:48
this happened again to another site. im curious to what is the reason for this to happen so we can stop this from coming up all the time?
Log in or register to post comments
lmeurs’s picture
Comment #21
lmeurs CreditAttribution: lmeurs commented 29 May 2015 at 14:11
Doesn't this smell like a MySQL bug? Whatever the Rules module does with the database, a table should never get corrupted. The server we encountered the problem on runs 5.5.36-cll-lve - MySQL Community Server (GPL) by Atomicorp.
Version info can be found:
by executing SHOW VARIABLES LIKE "%version%"; (more info) or
at phpMyAdmin's home screen.
Corrupted InnoDB tables do not seem to appear seldomly:
https://dev.mysql.com/doc/refman/5.5/en/...overy.html
http://dba.stackexchange.com/questions/4...re-corr...
Log in or register to post comments
deggertsen’s picture
Comment #22
deggertsen CreditAttribution: deggertsen commented 22 June 2015 at 23:05
Seems we're not the only ones having this issue: https://www.drupal.org/node/2097037
Log in or register to post comments
loze’s picture
Comment #23
loze CreditAttribution: loze commented 17 July 2015 at 07:13
I get this too. I can drop and recreate the table but after some time the error comes back and I need to do it again.
Log in or register to post comments
madelyncruz’s picture
Comment #24
madelyncruz CreditAttribution: madelyncruz commented 1 September 2015 at 00:55
#4 worked for me also. Two thumbs up for this. Thank you.
Log in or register to post comments
srikanth.g’s picture
Comment #25
srikanth.g CreditAttribution: srikanth.g commented 24 September 2015 at 11:24
while clearing the cache i got the same error,creating the table manually fixed the issue.Thnx.
Log in or register to post comments
reyna130’s picture
Comment #26
reyna130 CreditAttribution: reyna130 commented 18 October 2015 at 05:19
Hi everyone, I'm super new with all of this and learning as I go...I was hoping someone could help me in locating the phpmyadmin console. I'm trying to add code #4 but am having trouble locating it. It might be super easy, but I'm not sure how. Thanks.
Log in or register to post comments
rwilson0429’s picture
Comment #27
rwilson0429 CreditAttribution: rwilson0429 commented 18 October 2015 at 12:35
Issue summary: View changes
reyna130, if on a local machine, you have to manually install it (I suggest installing it under your website root folder). You may already have it on your Web development stack. If you install it under your web root, you should be able to get to phpmyadmin at localhost\phpmyadmin.
If on a webhosting service, it's normally already installed and you can get to phpmyadmin from cpanels under the databases section (cPanel->PhpMyAdmin). Only local images are allowed.
Log in or register to post comments
jomarocas’s picture
Comment #28
jomarocas CreditAttribution: jomarocas as a volunteer commented 26 November 2015 at 16:25
obviously this worked for me, for clear cache, i dont know how to make this, because i install rules but i dont know why fail if i dont use rules, but this works
DROP TABLE cache_rules ;
CREATE TABLE IF NOT EXISTS `cache_rules` (
`cid` varchar(255) NOT NULL DEFAULT '' COMMENT 'Primary Key: Unique cache ID.',
`data` longblob COMMENT 'A collection of data to cache.',
`expire` int(11) NOT NULL DEFAULT '0' COMMENT 'A Unix timestamp indicating when the cache entry should expire, or 0 for never.',
`created` int(11) NOT NULL DEFAULT '0' COMMENT 'A Unix timestamp indicating when the cache entry was created.',
`serialized` smallint(6) NOT NULL DEFAULT '0' COMMENT 'A flag to indicate whether content is serialized (1) or not (0).',
PRIMARY KEY (`cid`),
KEY `expire` (`expire`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Cache table for the rules engine to store configured items.';
Log in or register to post comments
maxplus’s picture
Comment #29
maxplus CreditAttribution: maxplus commented 14 December 2015 at 09:01
Thanks,
#13 worked for me but I had to create a new db because else I received the tablespace error when recreating the cache_rules table
Log in or register to post comments
Pene’s picture
Comment #30
Pene CreditAttribution: Pene at Cheppers commented 14 December 2015 at 15:10
Related issues: +#2212067: User warning: Table xxx.cache_admin_menu doesn't exist query: UPDATE cache_admin_menu..
Log in or register to post comments
Pene’s picture
Comment #31
Pene CreditAttribution: Pene at Cheppers commented 14 December 2015 at 15:11
Related issues: -#2212067: User warning: Table xxx.cache_admin_menu doesn't exist query: UPDATE cache_admin_menu.. +#2135373: Admin_menu cache breaks 'drush sql-dump'?
Corrected the related issue. The other one is a duplicate.
Log in or register to post comments
FrancescoUK’s picture
Comment #32
FrancescoUK CreditAttribution: FrancescoUK commented 20 December 2015 at 18:19
The way I solved the "(errno: -1)" was to create a table cache_rules_1 following indications from #28 (or #4 which looks the same to me but the XX_ prefix).
You need of course to delete the old table cache_rules as well, so don't rename/remove: DROP TABLE cache_rules ;
Once cache_rules_1 was created I renamed the table to cache_rules.
It went all fine with my case. Not sure what's causing that error or what's causing the table corruption.
P.S.: I did the above from phpMyAdmin. I think I logged off and logged on after having deleted the cache_rules table.
Log in or register to post comments
goose2000’s picture
Comment #33
goose2000 CreditAttribution: goose2000 commented 7 January 2016 at 15:42
Just thought I'd chime in that I just went through this yesterday, a small nervous break down is all. But the #4 fortunately worked for me. Thank you aeremeev and all here, I got my site going again. But would be nice to know how/why this table pukes.
Log in or register to post comments
Antoine Vigneau’s picture
Comment #34
Antoine Vigneau CreditAttribution: Antoine Vigneau commented 11 January 2016 at 18:03
I also had the same issue today on a production site. I did execute what is described in #28, with the additional error when recreating the table
ERROR 1813 (HY000): Tablespace for table '`congress`.`cache_rules`' exists. Please DISCARD the tablespace before IMPORT.
fixed with http://stackoverflow.com/questions/15694...table-x...
It's a bit frustrating to not know the root of this issue.
Log in or register to post comments
besek’s picture
Comment #35
besek CreditAttribution: besek commented 13 January 2016 at 19:27
I've experienced the same issue. Table cache_rules didn't exist and I get:
#1813 - Tablespace for table '`cache_rules`' exists. Please DISCARD the tablespace before IMPORT.
#32 solved the problem and now it seems to be fixed. Although I'd like to unerstand root cause.
Log in or register to post comments
hosais’s picture
Comment #36
hosais CreditAttribution: hosais as a volunteer commented 26 February 2016 at 11:47
I am glad that #4 worked for me. uf...
Log in or register to post comments
supriyarajgopal’s picture
Comment #37
supriyarajgopal CreditAttribution: supriyarajgopal commented 18 April 2016 at 06:32
I was getting the following error while trying to create table as mentioned in #13:
#1813 - Tablespace for table '`cache_rules`' exists. Please DISCARD the tablespace before IMPORT.
I navigated to xampp/mysql/data/ folder and deleted the cache_rules.ibd file.
Then I run the query as in #13 and it worked fine.
Hope this helps someone.
Regards,
Supriya Rajgopal
Log in or register to post comments
jarodms’s picture
Comment #38
jarodms CreditAttribution: jarodms commented 14 July 2016 at 15:10
This is a much larger issue and is not the fault of Rules. It is being addressed in Core: https://www.drupal.org/node/2229013. Even though that's a D8 issue, it still applies for D7.
The solution in #4 works for me too when I get the cache_rules problem, but only temporarily. The next time I Clear Cache (even 10 seconds later), bam it happens again.
If I turn Rules off and Clear Cache, it will happen for another module that uses cache, including Features, Metatag, Libraries.
fyi, I'm running MariaDB 10.1.6
Log in or register to post comments
rees’s picture
Comment #39
rees CreditAttribution: rees as a volunteer commented 22 July 2016 at 08:34
Thanks #5
Log in or register to post comments
morybel’s picture
Comment #40
morybel CreditAttribution: morybel commented 12 January 2017 at 13:29
Thank you so much for this. Much much appreciated.
Log in or register to post comments
benjamin_dk’s picture
Comment #41
benjamin_dk CreditAttribution: benjamin_dk commented 5 April 2017 at 09:50
I got the (error -1) as well when trying to create the table again - using #32 fixed it - code for renaming table:
RENAME TABLE cache_rules_1 TO cache_rule
07-15-2017, 01:06 PM
THANK YOU VERY MUCH FOR FIXING YOUR SERVER
I KNOW IT WAS HARD
These errors are caused by a particularly bad DDoS attack. We're working to filter the malicious traffic and add more capacity,
https://www.scamadviser.com/check-website/x3host.com
I KNOW IT WAS HARD
These errors are caused by a particularly bad DDoS attack. We're working to filter the malicious traffic and add more capacity,
https://www.scamadviser.com/check-website/x3host.com
07-16-2017, 08:57 AM
i purchased this hosting to test a while back and came back here to see what was going on. i'm really glad omni took a stance in this thread. in fact, i personally believe that this bso should be shut down entirely due to certain factors.
here's my review:
i can go on and on with my review but what's the point. people get it by now. this is a very unreliable hosting service and not worth the money even if it IS cheap. you are definitely getting what you pay for here which is pretty much a headache
i paid for a reseller account and had a headache with this service ever since. i decided to drop it. i didn't request a refund because it was only $20 or something and signed up just to test. fortunately for me, some sort of error occurred and they refunded my money and then asked me to repay due to their error. screw that. i'm not paying $20 for more headaches. this has to be the worst hosting service i've tested and i've tested a lot of cheap hosting services
i advise EVERYONE to stay away from this service unless you want to pay for an unreliable service and hosting. i am speaking from my own experience only. i've been hosting websites for about 15 years now. the OP has also been VERY shady in this thread so i wouldn't trust anything he says either.
after i decided to quit this service and find another, i decided to go with http://www.warriorforum.com/warrior-spec...tform.html on the warrior forum. i've had this service for 4 months no with no issues. it's VERY cheap, reliable, and no headaches. i never had an issue with this service in the 4 months i've had it.
when the op told omni, when pretty much only 1 person was creating negative reviews, i had to laugh. there were MANY people who were having problems.....ESPECIALLY trying to get refunds...... including a few reputable members here. this is just another example of the excuses the op makes and ignores his customers and how he tries to hide his crappy service from others. he outright LIED to a moderator. the OP continues to lie about pretty much every dispute a customer has or if someone is questioning him.
anyway, this is my review. all based on FACTS and personal experience. the op told omni that he is offering a more reliable service right now. although i ain't gonna fork over another $10-$20, i highly doubt it's the truth. the OP has already carved his reputation in stone and should be believed or trusted. SHAME ON YOU FREEBLACKHAT for your lies and deceptions here in this thread. you obviously don't care about the members here and are just looking to try and make some money. making money is fine, but not from the expense and heartache of others!
OP- stop making excuses and stop hiding the facts from potential buyers. stop getting the negative reviews deleted and stop lying to people and lying about how good your service is. you've been caught now. DEAL WITH IT!
here's my review:
- very slow load times
- sites down a lot
- HORRIBLE customer service
- sites hacked
- server was hacked
- OP continually assumes things that aren't true
- OP deletes negative reviews to hide his S***** service
- OP NEVER admits his fault in things
- people are having a hard time getting refunds
- hardly any positive reviews
i can go on and on with my review but what's the point. people get it by now. this is a very unreliable hosting service and not worth the money even if it IS cheap. you are definitely getting what you pay for here which is pretty much a headache
i paid for a reseller account and had a headache with this service ever since. i decided to drop it. i didn't request a refund because it was only $20 or something and signed up just to test. fortunately for me, some sort of error occurred and they refunded my money and then asked me to repay due to their error. screw that. i'm not paying $20 for more headaches. this has to be the worst hosting service i've tested and i've tested a lot of cheap hosting services
i advise EVERYONE to stay away from this service unless you want to pay for an unreliable service and hosting. i am speaking from my own experience only. i've been hosting websites for about 15 years now. the OP has also been VERY shady in this thread so i wouldn't trust anything he says either.
after i decided to quit this service and find another, i decided to go with http://www.warriorforum.com/warrior-spec...tform.html on the warrior forum. i've had this service for 4 months no with no issues. it's VERY cheap, reliable, and no headaches. i never had an issue with this service in the 4 months i've had it.
when the op told omni, when pretty much only 1 person was creating negative reviews, i had to laugh. there were MANY people who were having problems.....ESPECIALLY trying to get refunds...... including a few reputable members here. this is just another example of the excuses the op makes and ignores his customers and how he tries to hide his crappy service from others. he outright LIED to a moderator. the OP continues to lie about pretty much every dispute a customer has or if someone is questioning him.
anyway, this is my review. all based on FACTS and personal experience. the op told omni that he is offering a more reliable service right now. although i ain't gonna fork over another $10-$20, i highly doubt it's the truth. the OP has already carved his reputation in stone and should be believed or trusted. SHAME ON YOU FREEBLACKHAT for your lies and deceptions here in this thread. you obviously don't care about the members here and are just looking to try and make some money. making money is fine, but not from the expense and heartache of others!
OP- stop making excuses and stop hiding the facts from potential buyers. stop getting the negative reviews deleted and stop lying to people and lying about how good your service is. you've been caught now. DEAL WITH IT!
07-16-2017, 09:43 AM
I gave up on getting my back from these guys.
This BSO should be shut down.
This BSO should be shut down.
07-17-2017, 09:10 PM
can i get one account for myself to ttry out?
07-28-2017, 12:28 AM
Hi X3 Host
System is down..."Error establishing a database connection"
System is down..."Error establishing a database connection"
07-28-2017, 12:31 AM
(07-28-2017 12:28 AM)Redsun Wrote: [ -> ]Hi X3 Host
System is down..."Error establishing a database connection"
How is this still not closed and seller banned?
07-29-2017, 02:38 AM
They are the worst of the worst, stay away from these guys. And they are talking about opening up again, what a f****k joke, STAY AWAY!!!! RUN THE OTHER WAY!!!!
07-29-2017, 12:12 PM
Hi X3 Host
My site is up and running since yesterday. Thanks
My site is up and running since yesterday. Thanks
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302