On the live server a table was not found mysteriously. I twas working normally but suddenly i got sql error of missing table. I looked through phpmyadmin i found that a table was really missing mysteriously. It happened first time in my MYSQL life.
Can you please tell me what happened, why the table vanished mysteriously?
Maybe a SQL injection attack dropped the table? Have you checked the database logs?
Related
I created two tables like this
and I want to change the added data's id so I use
alter table member auto_increment=5;
after this, it couldn't show my member table. It shows
error 2013: lost connection to MySQL server during query.
I thought my table is too big to run, so I changed the limit and the DBMS time out, but it didn't work either. Can someone tell me what's the problem now?
I found the problem. Don't edit your MySQL database when you're connecting it with your Python Flask program. Edit means any CRUD actions.
I had a DB with some values and for some reasons I had to clear the content of all tables. Then I changed the structure of my tables and I wanted to add the new data to populate my tables.
In order to add the data I do basically like here. Here is what I get, I saw on the internet that it was a problem with my version on Mysql workbench but I never had any problem when I did that previously so I'm kinda not sure where is the real problem.
Ok I get the error, it definitely was not a MySQL version.
Okay, so first of all, I am SO sorry if this is an ignorant and stupid question. I have absolutely no knowledge of databases. I have only used them when creating and uploading Wordpress sites, and it works if everything goes without any errors.
So here is my problem:
I've created a Wordpress website on a local server. I've done the usual, exported the database, tried to upload it on the live server, but there seems to be an error.
I get the #1064 error.
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '?' at line 59
Half of the tables do not import on the live server. Here's what I've already tried:
Exporting the tables with the "Enclose export in a transaction" and "Disable foreign key checks" checked.
Exporting in two files with and without the mentioned options checked. This way I got more tables, and the wp_options table got
full instead of empty, but still only 15 tables instead of 23.
I checked to see if the "TYPE" syntax is "ENGINE" and it seems fine to my unknowing eyes.
I am a total ignorant when databases are concerned. I don't know what to check anymore. My guess is that the live server uses MariaDB and it is somehow not compatible with the SQL I'm trying to upload.
I tried to see the line 59, but there is no "?" there, at least not where I'm looking at. It might be that I'm looking at the wrong place, the blond that I am.
Here's the code around the line 59 when database is opened in editor.
--
-- Table structure for table `wp_gg_folders`
--
CREATE TABLE `wp_gg_folders` (
`id` int(11) NOT NULL,
`title` varchar(255) NOT NULL,
`date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
I tried to see the MariaDB's documentation and the possible way to deal with any incompatibility would be to update my MySQL. I have no idea how to do it.
Oh and btw. I already have a working website on this server but with an older version of Wordpress, so if it's an old SQL version, why is it working there?
This turned out to be long... sorry. And thanks in advance!
Edit: I discovered there is a problem with exporting. In the exported file, there are always last third of the tables missing. I have no idea why. Can I somehow get the tables/whole database manually, and not through PhpMyAdmin?
Okay guys and girls, I've found the solution.
The problem was not in any error, it was in exporting the database at the very beginning, therefore, importing showed different kinds of errors each time I tried to import the database.
The query, while exporting would abort the export causing only part of the tables to be exported. By changing the length of the query while doing the export, I solved the problem.
Instead of 50000, I wrote in 1047551.
Here's the article that helped me, with screenshots:
https://wpengine.com/support/exporting-database/
I was importing one table in a MySQL Server when the power went down. After this event I tried to query the table I was importing, but got the error 2013, only when I'm querying this table (the others work just fine).
I have physical access to the server, tried to execute any query from there (tried to SELECT, and even DROP TABLE) but still got the same error.
Does anybody know a solution where I can re-build only the table (without building the whole schema from scratch?)
I'm adding this as an answer rather than having lots of comments underneath. I must state in advance that I've not used MySQL but I have used SQL server a lot so I'm hoping that something I say may help.
You say the table is still there. Was it created as part of the operation you were doing or had it been there for a while?
What happens if someone else or a different account tries to access this table?
Is there anything on this page that is relevant to your problem?
http://dev.mysql.com/doc/refman/5.0/en/gone-away.html
I went to connect to my website via firefox earlier this afternoon and I got an error message reading "Unknown storage engine 'InnoDB'." This is particularly weird because I haven't touched the DB at all during the past few days and my site was working just fine up until a few hours ago. When I went to phpmyadmin, I noticed that some of the tables that had the collations utff8_general_ci have been changed to "in_use" and their engines have been changed from MyISAM to nothing... the engine type is just left blank in phpmyadmin. I'm kind of new to the more intricate aspects of mysql and don't know what's going on. Could someone offer some insight that could possibly lead me in the right direction?
Thanks,
Lance
Try the following:
REPAIR TABLE `table_name`
This may not be a table, but a view that references another table/view that doesn't exist anymore. If this is the case, when you click on the table name, then an error will appear:
1356 - View 'PervAtOtherData' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
To view what the view is calling use this SQL:
SHOW CREATE VIEW `PervAtOtherData`;
Or, to delete the view:
DROP VIEW `PervAtOtherData`;
If on windows, do system restore. I had the same problem on 37 tables. It worked for me. If hosted replace the database tables with the ones you have on your computer