MySQL Error #1146 can't get rid of deleted tables - mysql

I know #1146 has been asked too many times, but my case is a bit different, so please bear with me.
I was trying to delete a database "libdb_bak" as I no longer need the backup db, however, some error happened and PHPMyadmin asked me to create something related to "pma" thing - I didn't paid attention to the details, and after confirming the operation, I go on to my other tasks.
After returning to PHPMyAdmin, the operation seems failed, so I go to C:\AppServ\MySQL\data\ to delete the database manually, now every time I tried to go into any database, it will fail with error message regarding "libdb_bak.pma_tracking" doesn't exists.
I tried uninstalling AppServ (AppServ: 8.6.0 includes MySQL:5.7.17, PHPMyAdmin: 4.6.6) and deleted the whole AppServ directory (clean delete, nothing left in Recycle Bin), restart PC, re-install AppServ, and the problem still exists - it is still looking for the libdb_bak.pma_tracking file, which, it is not supposed to remember, since I already done a clean wipe and fresh re-install.
Can anyone help me to locate the residue of this file location memory, so that I can get rid of it for good? I can't use my PC to continue my work, as long as this problem still exists. Thanks in advance.

Have you tried this one: #1146 - Table 'phpmyadmin.pma_recent' doesn't exist
Btw, Have you tried creating table "libdb_bak" from the terminal or Work Bench/Heidisql etc? And see if recreating the data files solves the issue.

Solved the problem, the culprit is the cookies! Cleared my browser history for the last few hours and the problem goes away.
Thanks to Batman's answer, recreating db with the same error leads me to investigate other options and found the solution! Thanks.

Related

Missing Schemas in MySQL Workbench

I am having an issue in MySQL Workbench, where many of my created schemas are missing. I was in a Coding Bootcamp, and all the schemas that I created during that period vanished. The ones created beforehand are all still there. I'm pretty sure I am using the same user account and I checked the privileges. I also checked usr/local/var/mysql and the missing schemas are not located in this folder. So my question is what happened to them? I certainly did not delete them. Maybe someone else did when I wasn't looking? Or could this have been caused by an update? I went several months without opening Workbench, so I'm not exactly sure when this happened. I have searched for hours and hours on SO and google and have not found an answer. Any ideas are much appreciated!
Also, I am on MacOS Catalina 10.15.7 if that helps.

MySql databases corrupted after upgrade?

I have been dealing with this issue for a while now. For some reason, when i went to run a Ubuntu upgrade, MySql-server upgrade failed. This was on about 8/10. This had happened before due to a "DATADIR" link (won't go into detail on that just now). I went through hell trying to get the package to upgrade and eventually got the package to upgrade by creating a new MySql database structure (after moving mine somewhere else). Once I did that (with some steps involved) the package upgrade completed.
Then, when I tried to replace the "new" databases with my old onse, it wouldn't start the service. I came to find out that the "Mmysql" (system) database folder was just completely gone.
So, I took the "new" database and overlayed it on my "old" database files. This got me in! Of course, old users, and anything else in the system database, was gone. So I started to rebuild them.
The problem occurred when i tried to go into some old databases. About half of them report that the table does not exist when trying to load them. Mostly, it is all of the tables in particular database, but there are a few databases where some tables "don't exist" and others do.
The thing is that the tables do exist. I believe they are simply corrupt.
So, I'm really trying here, but I can't seem to figure out how to get all of the tables to load. I have a backup from the 13th, presumably after the upgrade failed but before I really started messing with things. I'm going to try to use that, but if anyone knows how/why some tables are corrupted all of a sudden and why others are not and especially if someone knows how to fix this, that would be absolutely wonderful.
Unfortunately, my regular backups haven't been working for months, and the latest backup I currently have access to is 2 years old. Quite a bit has changed in the database since then, but as a last ditch effort, I may try to import that data and use "mysql_upgrade" to restore this, then overlay any new databases I have created since then into the directory structure and see if they import that way.
Thanks for any suggestions you may offer.
--mobrien
I believe this was due to a permissions issue that had some files locked and when I fixed the perm issue, the tables that were accessible were corrupted. I restored the same backup again and this time it worked. The only folder that was missing was the "mysql" folder, and for that I recreated a new one, then patched it in, then created new user permissions for the existing tables. This was working, but then I ran into another issue, so I will open a new questions for that. This has been a nightmare and the moral of the story is: keep better backups and test them!

Can't edit table row in phpmyadmin

I've just had an issue with a client's site they couldn't login to an admin area I built for them. I verified this and went straight into the database via phpmyadmin.
I thought I'd try to edit the admin password and see if something has gone wrong here. I've clicked edit (pencil icon) however I don't get the row to edit I get the following...
Column | Type | Function | Null | Value
and a go button, no edit options, no row data, I click go and get an error:
tbl_replace.php: Missing parameter: goto
I'm guessing there is some kind of database issue going on here. I've tried a Check Table and an Analyze Table, with no results output.
Not really sure what's going on here, I've never come across this before.
Any ideas? Sorry if it's a bit vague I've tried to include as much info as I could as simply as I could.
[UPDATE]
I think I've found the culprit to a few issues on my vps, including database and my clients website etc. I found that my tmp directory is full. Old sessions and misc files not being cleared. This could very well be the cause. I have one file '.cpanel_easy-.bLfpq2ZYoTbdcY_c' that I can't identify that is taking up a whole lot of space, if I knew what this was I could possibly fix my issue.
I can confirm that the issue I was having was caused by the tmp directory on my VPS being full. It was filled with old temporary install files and a bunch of sessions (hundreds) and other miscellaneous files mainly from software updates but a whole bunch from various Wordpress installations, I'm guessing plugins with some messy coding that don't clean up after themselves.
Thanks to those that helped out.

Table not viewable in MySQL DB, query runs fine

I have a sql query done by someone. I cannot seem to see the table where query is reading from, but offline, the table is in the same db. The dbconfig is the same offline and online.
Is there any way I can find where the table is, or unhide if hidden.
Thanks Jean
This sounds like a permissions issue. If you're the database administrator, login as root to see all the tables that exist. (If you can't see it as root, it just plain doesn't exist.)
If you're not the database administrator, contact whoever is to get access.
you can try running the query "show full processlist;" which will show you what connections exist, what database they are connected to, and what query they are currently executing.
You can also turn on query logging by adding "log = /path/to/logfile" to the config file or "-l logfile" to the mysqld command line and watch the queries executed there, though note that this can be a performance killer.
Please post the query. Some points to consider -
Maybe you are not in the correct database. Change to that database & try again.
Maybe you don't have permissions to log into that DB. Your script has (thanks to correct username, password).
That's all I can think of for now. Post your query so answer can be more constructive...
Thanks issue solved.
[edit]
Sorry guys...
#pekka ofcourse, had to jot quickly to close the issue.
I was auditing couple of servers, and noticed that one particular table in a db was missing, but queries was fine. It was on one server, which had nothing to do with the db. I had root access, but could not see anything, but a test db.
Thanks all for your help, as you all have been. Every answer is equal to a correct answer, and I am unable to mark it correct. Therefore I have given an upvote for all.
Thanks again

What would lead to an "Unknown object in backup file" problem when restoring a backup of a MySQL database?

Unfortunately, the problem is not more specific than that. I've found a few examples of people reporting similar problems by doing a Google search, but I can't find the part of the restore that is actually causing the problem, which might help me track it down on my own.
Suggestions for either resolving this problem or being able to track down the root cause would be appreciated.
There's one bug logged at bugs.mysql.com that references the error you describe:
"Bug #37253 Unable to restore backup file containing BLOBs"
The solution described in that bug is to increase the max_allowed_packet in the MySQL server configuration. The user confirmed that raising the value to 100M allowed him to restore his database.
ANOTHER FIX
I also had this problem! The answers online didn't seem to help (max_allowed_packet and others)
Here's what fixed mine:
Instead of running the Restore function, I imported through MySQL Migration Toolkit (installed with GUI Tools on Windows).
The Migration Toolkit also failed, but had descriptive errors in the Log on the final page. In my case, it was a few incorrect Date fields in my data (usually "0000-00-00") that wouldn't migrate correctly.
Fixing these dates in my tables solved the Restore problem.
Hope this helps somebody else out there.
I have had something similar in the past- it has something to do with how it was backed up. I think some applications put invalid comments in the backup files which cause errors.
My suggestion- if you are stuck trying to restore those files- is to incrementally start backing up from sections of the backup file and find what is causing the problems- which from what I recall the case for me was that they were some text in the file that was inconsequential to remove.