mysql-error-1146

restoring a MySQL database

元气小坏坏 提交于 2020-01-12 03:21:08
问题 I have created a file named ab.sql using the mysqldump utility of a database named library. It worked fine. Now i am trying to restore it using mysqlimport. My database already exists. But i want to override it. I am using the command mysqlimport -uroot -p**** library D:/ab.sql in the command line but it gives an error that says, mysqlimport: Error: 1146, Table 'library.ab' doesn't exist, when using table: ab desperately need help. 回答1: mysqlimport reads rows from a text file into a database.

MySQL Pass table name to cursor select

江枫思渺然 提交于 2019-12-30 07:19:24
问题 I want the procedure to take parameter answertable and partid in the select statement, but when i call it it doesn't replace the parameter answertable with the value the call call updateTotalScores('quiz_participation', 'quiz_answer', 1) returns the error: 1146 - Table 'quizdb.answertable' doesn't exist passing the id works, but passing the table name doesn't so how do i pass the table name to the select in DECLARE cur1 CURSOR FOR SELECT SUM(`score`), SUM(`maxscore`) FROM answertable WHERE

InnoDB tables exist in MySQL but says they do not exist after copying database to new server

天涯浪子 提交于 2019-12-30 02:31:25
问题 I used mysqldump to export my database and then I imported it into MySQL on my other server. I can now see all my tables if I do "show tables" but I can't actually select from or describe any of them. ERROR 1146 (42S02): Table 'mydatabase.user' doesn't exist All of my tables are InnoDB. I saw one issue people had where they were using old_passwords, so I explicitly set that to 0 in my.cnf and I made sure all of the passwords in the mysql table were 41 hexadecimal digits as they should be for

SQL - AS - table doesn't exist - 1146

久未见 提交于 2019-12-24 08:23:00
问题 My query is: SELECT temp.pid FROM (SELECT postid, date FROM swapping AS s, post AS p WHERE s.mid='2' AND p.postid=s.postid) AS temp WHERE temp.date = (SELECT MAX(date) FROM temp) I receive #1146 - Table 'databasename.temp' doesn't exist How can I make it work? Thank you. 回答1: It seems like you want to select the last "pid", in terms of "date", where s.mid='2' Try this (after you figure out where pid comes from and correct the first line) SELECT [s? or maybe p?].pid FROM swapping s INNER JOIN

Is there a better way to assign permissions to temporary tables in MySQL?

丶灬走出姿态 提交于 2019-12-23 11:52:16
问题 Our users log into the production database as a fairly low-level user, with SELECT granted at the database level, and INSERT/UPDATE/DELETE granted on the specific tables they need access to. They also have permissions to create temporary tables (we need them for some of the more complicated queries). The problem is that whilst they can create the temporary tables, they don't have access to INSERT into them! A workaround we have found is to create a "real" (persistent?) table of the same name

Bug? #1146 - Table 'xxx.xxxxx' doesn't exist

ぃ、小莉子 提交于 2019-12-17 06:41:36
问题 I am using windows XP. I am creating a table in phpMyAdmin using its built-in create table feature, my database name is ddd . It generates the following code: CREATE TABLE `ddd`.`mwrevision` ( `asd` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , `sddd` INT NOT NULL ) ENGINE = INNODB; and the following error shows up: MySQL said: #1146 - Table 'ddd.mwrevision' doesn't exist What might be the problem? 回答1: I also had same problem in past. All had happend after moving database files to new location

Bug? #1146 - Table 'xxx.xxxxx' doesn't exist

谁都会走 提交于 2019-12-17 06:41:07
问题 I am using windows XP. I am creating a table in phpMyAdmin using its built-in create table feature, my database name is ddd . It generates the following code: CREATE TABLE `ddd`.`mwrevision` ( `asd` INT NOT NULL AUTO_INCREMENT PRIMARY KEY , `sddd` INT NOT NULL ) ENGINE = INNODB; and the following error shows up: MySQL said: #1146 - Table 'ddd.mwrevision' doesn't exist What might be the problem? 回答1: I also had same problem in past. All had happend after moving database files to new location

Magento - Base Table core_file_storage Doesn't exist

此生再无相见时 提交于 2019-12-09 18:46:08
问题 When I look in the error log for my Magento store it is full of these errors: [02-Jun-2011 13:49:12] PHP Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mysite_mysite.core_file_storage' doesn't exist' in /home/mysite/public_html/lib/Zend/Db/Statement/Pdo.php:228 Stack trace: #0 /home/mysite/public_html/lib/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array) #1 /home/mysite/public_html/lib/Zend/Db/Statement.php

Table doesn't exist after CREATE TABLE

时光怂恿深爱的人放手 提交于 2019-12-04 02:47:10
问题 I'm trying to import this sql in my database name symfony CREATE TABLE IF NOT EXISTS ingredient ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; and i get #1146 - Table 'symfony.ingredient' doesn't exist This seems rather odd since i'm trying here to CREATE this table, so... why is it not working ? I've got the same problem if i try CREATE TABLE symfony.ingredient Or the feature in symfony 2 c:\Dev\Symfony>php app

MySql - I dropped general_log table

淺唱寂寞╮ 提交于 2019-12-03 03:54:44
问题 Logging enabled I enabled logging using: SET GLOBAL log_output = 'TABLE'; SET GLOBAL general_log = 'ON'; All executed queries was logging to mysql.general_log table. It is fine. Attempt to clear the table Then the table became large and I wanted to delete all records from the table. I executed: DELETE FROM general_log But this caused to an error that says I cannot lock log tables. So, I dropped the table after disabling logging: SET GLOBAL general_log = 'OFF'; DROP TABLE general_log; I hope