PHPmyAdmin #1932 - doesn't exist in engine - mysql

I installed phpmyadmin on Debian. I copied the database folder from an old server into the current MySQL folder. Then came the error # 1932 - Table doesn't exist in engine. I also copied the ibdata1 but to no avail. What can I do?
Kind regards

Copying the data/files works only if
It is the same database server version till the subversion
You have to copy all files from the data directory.
You can tryto upgrade the database for that consult the manual

Related

Migrating a Mariadb/wordpress site with only .frm files

My server crashed. My /home /www and lib/mysql were on a different hard disk so I have all the data. The original server was Debian 9 with Mariadb and an apache webserver. I planned to move to mysql so I have a debian 10 server with mysql. I also have another debian 9 server with Mariadb so that I can use sqldump to move my databases. All my databases moved over fine, except one that was a wordpress database. That directory only has .frm files in it, there are no .MYD or .MYI files. I tried copying them to /var/lib/mysql of the Deb9 server, changed the permissions and ownership. However, mysql dump gives the following error message
mysqldump: Got error: 1932: "Table 'dbname.tablename' doesn't exist in engine" when using LOCK enter code here
I tried copying them as is to the MYSQL server too, the server did not see the tables. In the MariaDB server command line interface it shows the tables. However when I try to view the contents of any table it says
Error 1932 (42S02): Table 'dbname.tablename' doesn't exist in engine
I get the same error when I try repair table.
Any ideas on how I can get this moved?
I have resolved my issue. Instead of copying only the database folder, I copied the entire /var/lib/mysql folder to the mariadb install. Then I did sqldump on each database and moved them to the mysql server. I'm not sure why the copy of the database folder didn't work but I got all my data back.

WAMP: using .MYD, .frm , .MYI , db.opt to restore database

Some days ago I forced to uninstall my wamp cause I didn't have any access to phpmyadmin, so that I just copy the MySQL folder of that damaged wamp before uninstalling to have databases to reuse them later
Now I installed a new version of wamp and when I pasted the databases file such as .MYD, .frm , .MYI , db.opt in the data folder of MySQL wamp, in phpmyadmin I can see the tables but when I wanted to see the columns I got this error:
#1146 - Table 'Databasename.table_name' doesn't exist
Please tell me whats wrongs with them? is there any way to use my old databases? If attaching database files is needed to tell me to do that...
luckily the problem solved by my self!
I did it in the simplest way! just deleted last MySQL folder which was the newer version of MySQL and pasted that previous MySQL folder in it, then just edit the my.ini file and correct the wrong address and folder names
Don't forget to restart the services
for my self, there was no need to do something with MySQL command line which some friends said to do
if you think deleting MySQL folder could be riskable install a new wamp which has got as the same version of previous damage databases...
So the version of both databases have to be the same, especially when your database engines are InnoDB
hope be helpful

How can I recover sql tables from a broken Xampp

I made a mistake in my latest upgrade to Xampp, I copied my old Xampp directory to C:/Xampp - Copy but I forgot to export out the mysql tables. I then uninstalled xampp and installed the new version.
I tried to access the phpmyadmin from the Xampp - Copy folder but I cannot get access to it to dump its tables, is there anyway I can gain access to my old tables?
c:/xampp-copy/mysql/data
See This directory for your database tables.
if these are in unreadable format then i think problem is with your Database engine. Checkout the following guidelines.
InnoDB Backup and Recovery
Moving or Copying InnoDB Tables to Another Machine
See This Answer also. Import .frm and .opt files to MySQL
I managed to get it working through the new PHP My Admin, all resolved now.

Some MySQL tables unaccessible after AMPPS update/reinstall

After a reinstall of AMPPS (upgrade failed, so I installed the new version over the old one, some config files fixed after new installation), some MySQL database tables seemed to have been lost. In phpMyAdmin I can only see some of them. I checked the database folder and found that I can see files for all of my tables - only some of them don't show up.
Example:
Files for a table that is displayed in phpMyAdmin:
dbtable_ok.frm
dbtable_ok.MYD
dbtable_ok.MYI
Files for a table that is NOT displayed in phpMyAdmin:
dbtable_not_ok.frm
dbtable_not_ok.ibd
These latter files can also not be accessed by websites (especially Joomla).
This is the info about DB and Server from phpMyAdmin:
Database server
Server: localhost via TCP/IP
Server type: MySQL
Server version: 5.6.23 - MySQL Community Server (GPL)
Protocol version: 10
User: root#localhost
Server charset: UTF-8 Unicode (utf8)
Web server
Apache/2.4.12 (Win32) OpenSSL/1.0.1l PHP/5.3.29 mod_wsgi/3.5 Python/2.7.9
Database client version: libmysql - mysqlnd 5.0.8-dev - 20102224 - $Id: 731e5b87ba42146a687c29995d2dfd8b4e40b325
PHP extension: mysqli Documentation
I hope that there is some simple setting in the config files to fix this ...
Thanks!
Any hints or warnings in the MySQL error log?
It's probably bad news for you. The reinstall probably overwrote your existing database. In particular, InnoDB tables are stored (by MySQL default) in the ibdata1 (and so on) file; this file is not portable between MySQL installations. What probably happened was that the new AMPPS installation installed a new set of databases which wiped out your existing database -- either just the metadata MySQL uses to keep track of it or the complete database.
Now it looks like you've got an individual .ibd file, which means that all hope isn't lost. The instructions are rather complex and IMHO not suitable for copying and pasting here, but refer to the MySQL manual https://dev.mysql.com/doc/mysql-enterprise-backup/3.7/en/partial.restoring.single.html and this random site I just found http://www.chriscalender.com/recovering-an-innodb-table-from-only-an-ibd-file/ and perhaps one of them will help. This is where an error message from the MySQL startup may help determine exactly what's going wrong. Depending how old your backup is, it may be safer to just restore from backup.

Attaching an existing database with MySQL

Disclaimer: I have never used MySQL before!
I have a folder containing a number of .frm, .myd and .myi files that I believe are a MySQL database. I have pulled these files from a defunct server for a client who has not used the server or database for some years but is now looking to resurect some of the data for a new venture.
I have downloaded the latest free edition of MySQL, along with MySQL Workbench and am looking to connecct the existing database to the new installation; the equivalent to an "Attach" if I were using MS SQL Server.
I have found a few articles that say if I simply copy the folder into the data folder for MySQL and restart the service the database will show up. I have tried this (using both the data folder within the installation folder and also the "MySQL Datafiles" folder created during the intial configuration but when I restart the service nothing shows up.
How should I go about attaching this database?
Ok. I found the answer, the folder I was adding the database to was the wrong one.
Though I had found 2 "data" folders, there was a 3rd hiding in C:\ApplicationData; once I added my data files in here and restarted the MySQL service I could see the data.
On Windows 8 the default folder where MySql databases are stored is:
C:\ProgramData\MySQL\MySQL Server 5.6\data
5.6 is the version.
Please note it is ProgramData not Program Files which is easy to overlook.
Copying there and restarting the service worked fine for me. I'm even copying the DBs from an earlier 5.X version.