#1146 -Table XXXX doesn't exist - mysql

I use phpmyadmin v4.1.14 Apache version 2.4.9.
After my wamp corrupt I copy the whole folder of wamp and install the new one with the same version.
I replace all the folder expect wampmanager.ini which was corrupted, but after going to phpmyadmin, all databases don't show any data with error after click any table:
#1146 -Table XXXX doesn't exist
I try to read some answers here but not working.

wampmanager.ini is re-created every time you start WAMPServer, and when you do a refresh from the menu.
If wampmanager.ini was really corrupted, then it is most likely that wampmanager.tpl was actually corrupted, as that file is used by wampmanager.exe to rebuild wampmanager.ini
However, it is rare for either file to get corrupted unless someone has been playing with the wampmanager.tpl file. Always take a copy of wampmanager.tpl if you are trying to change it, so you can get back to a working system by restoring your copy.
Restoring your backup
The simple way.
If all you think you need from the new install is the \wampmanager.tpl and wampmanager.ini then this is a simpler solution
On your new install of WAMPServer:
Using the wampmanager menus, do
(right click)wampmanager-> Apache-> Service->Remove service
(right click)wampmanager-> MYSQL-> Service-> Remove service
(left click) wampmanager-> exit
WAMPServer is basically uninstalled, but no files have been deleted
rename C:\wamp\ to C:\wamp_new
Now restore your backed up version of WAMPServer
copy c:\backup_wamp to C:\wamp
Now pick up the 2 files you think are corrupted from the new install and place them in the restored original WAMPServer
copy c:\wamp_new\wampmanager.tpl to c:\wamp\wampmanager.tpl
copy c:\wamp_new\wampmanager.ini to c:\wamp\wampmanager.ini
Start WAMPServer
Now re-register the Apache and MYSQL services
(right click)wampmanager-> Apache-> Service-> Install service
(right click)wampmanager-> MYSQL-> Service-> Install service
To make sure the SYMLINKS are correctly rebuilt do
(right click)wampmanager-> Apache-> Version-> 2.4.9 (click on the 2.4.9)
or whatever version you are using
Your old WAMPServer should now be reinstalled, but with the new versions of the wampmanager.ini and wampmanager.tpl
If this does not work, you have not changed your original backup in any way, but you should be back where you were before installing the new WAMPServer, but having replaced the 2 files you think were corrupted.
If this does not come up with your old database intact, then you did not make a complete backup, and I am afraid your database may well be lost for ever.
If all works you can delete the C:\wamp_new folder to avoid confusion later

Related

Upgrade MySQL 5.6 to 5.7

I'm quite new to MySQL and learning fast. I installed WAMP on my system and have been using it for a month or so. I'm looking to upgrade MySQL to 5.7 as I will be in need of the new gis features but I can't find a easy to follow step by step on what I need to do.
I have been reading over at MySQL on how it is done but find it either confusing or incomplete, not sure which. I have been reading for the last 6 hours and still no closer to knowing how it is done.
I have backed up my databases, which I'm really not concerned with at this point as they are still in the development and learning state and will be rebuilt anyways.
How do I upgrade 5.6 to 5.7 with full instructions?
Download the ZIP version of the mysql you want to run ( not the msi installer, only because I dont know what it may do or assume when it installs )
Suggested source [www.mysql.com]
From wamp manager, Stop all services.
Go to c:\wamp\bin\mysql\ and create a new folder named appropriately i.e mysql5.5.28
Unzip the mysql and copy the contents of the MySQL folder into your newly created folder. Make sure the directory levels are the same as your existing MySQL folder.
Copy all the contents of your previous mysql\mysql5.5.10\data folder into the new data folder under your newly created version folder.
Thats EVERYTHING not just your databases, including the ibdata1, ib_logfile0, ib_logfile1 and all the mysql-bin.0000xx files.
We are going to use the recommended mysql-upgrade tool so this is ok to do.
This will also ensure that you keep all your Users and password and granted privilages intact when the upgrade is complete.
Copy c:\wamp\bin\mysql\mysql5.5.10\wampserver.conf to c:\wamp\bin\mysql\mysql5.5.28\wampserver.conf
All the folders in here are relative to where this file lives, so normally nothing need changing in here.
RIGHT CLICK wampmanager -> refresh
This will make wamp manager find your new version.
Check this by Left click wampmanager -> MySQL -> Versions Your new version should be available in the list.
From wamp manager -> MySQL -> Version click on your new version.
Normally you would have to uninstall the old wampmysql service and re-install the new wampmysql service, but wamp takes care of all that for you by just clicking the new version number.
This should also start the new mysql service, so now the new mysql is running.
BUT DONT DO ANYTHING YET!!!
Launch a command window ( using Run As Administrator ).
CD into c:\wamp\bin\mysql\mysql5.5.28\bin folder ( the new releases bin folder ).
And run
mysql_upgrade -u[your MySQL admin userid] -p > upgrade_results.txt
It will ask you for the password for the admin user you provided on the -u parameter.
enter the password.
Wait while it runs, If you have very large databases this may take some time but normally it will take anything from a few seconds to a minute or two.
This will look at your databases and do any upgrades that are required and also any upgrades/maintenace of the mysql database that MySQL uses internally.
Thats the tables that contain your userids and password and privilages and other things.
Check for errors in the upgrade_results.txt file, fix if there are any.
You can repeat this as often as you like, just refresh the data from the old versions data folder each time.
LEFT Click wamp manager -> MySQL -> Service -> Stop Service.
Then again and Start Service. This will load the changed mysql database with any new/changed config info.
At this point assuming you are staying on the newly installed version of MySQL its a good idea to run:
wampmanager -> MySQL -> MySQL Console
and run a
reset master;
To reset the log files.
from here: http://forum.wampserver.com/read.php?2,111797,124054

Mysql database didn't working after overwritting installing wamp.

I am using wamp server. I have made some project and there are some also databases.
I install new window and then i install wamp server in same drive where the wamp sever is.
After installing wamp my project file in "www" are present as pervious but in phpMyAdmin there is only database name is present when I open it there is no table. where the tables gone ???
I check the "wamp>mysql>data". Here the files are present of that tables but it does not show in the phpmyadmin.
I need these tables how can I recover it.
I suggest to you ,use the feature in windows called "restore previous versions" .
Right click the Wamp folder click Restore previous versions and select the most recent date you know it was working,it maybe work for you.
I assume you mean that you did ...
Install new windows.
Install WampServer on new windows
Copy my old\wamp\www folder to the new install
Copy the subfolders in \wamp\bin\mysql\mysql{version}\data to the new install
If this is correct, then dont forget to copy the contents of \wamp\bin\mysql\mysql{version}\data as well. If you are using INNODB database the actual data lives in the ibdata1 file in that folder.

XAMPP NOT WORKING! - OS X Yosemite

I was working with XAMPP 1.8.3-3 on OS X Mavericks. After upgrading to Yosemite Mysql server stopped working. And an upgrade to XAMPP 1.8.3-5 fixed the problem and mysql server starts working.
Now the entire database list is showing on phpmyadmin, but no access to the tables. Its showing “#1146 - Table ‘DB_NAME.TABLE_NAME’ doesn’t exist”.
Unfortunately I don't have any DB backup!
I have the entire XAMPP folder backup. So how I can able to retrieve the mysql tables?
just type /Applications/XAMPP/xamppfiles/bin/mysql.server start
in terminal then start xampp
you can restore if you have all the mysql folders from XAMPP folder. (check /XAMPP/xamppfiles/var/mysql in backup)
if you have var/mysql folder, open and look for database names you had earlier.
there is a separate folder for each database you had earlier. open the folder and it will contain lots of files with table names.
if your old table engine is InnoDB you will see 2 files. with .frm and .ibd extensions.
or if you had MyISM it will contain three file per table which has .frm, .MYD and .MYI extensions.
after you verify you have all the required files in backup, you can start restoring them.
stop mysql
copy required database folder completely and paste it to currently installed folder. (/Applications/XAMPP/xamppfiles/var/mysql/)
start mysql
to restore web files, open htdocs folder in backup and copy required site folder to currentely xampp installed htdocs folder.
This solution worked for me. Good Luck !
Do a clean install. See my answer for my own question. xampp mysql server not starting. The bad part is that I'm not sure if it will save your database the way I explained. What you might try is going to xampp > xamppfiles > var > mysql > 'your database name' and making a copy of the database folder on your desktop and moving it back once you reinstall it. I tried and I think it might have worked had I changed the file permissions. You can also try experimenting to see if it preserves the database if you do this. I would do some serious testing if you really want to save your database before doing this.

Some database content disappeared after WAMP reinstallation

I screwed up the config files for Apache
I reinstalled(without any uninstall) the WAMP in same folder but instead of 2.4 I did 2.5, so WAMP failed gloriously afterward.
I can not access WAMP anymore, so I can not backup my DBs from PHPMyAdmin (any hint about how to do backup in this senario will be helpful)
I copy the whole /wamp folder content (after screwed up the install).
I installed the 2.4 version Now WAMP running All DBs are still listed there But when I accesss two of the WP sites, they ask me to create a new site title, but not allow me to set username (says"User(s) already exists.").
Now I went back PHPmyAdmin and found the db for that WP site is EMPTY
I wonder how can I retrieve the good database information stored in that original /wamp folder backup, somehow, transfer into the new one, so that the db table that is EMPTY will populate with the original data again?
Thank You
Probably the safest way to recover is to:
Stop WAMPServer.
Copy the old MySQL folders to the new install of WAMPServer
So thats
copy \wamp_backup\bin\mysql\mysql(old version) to \wamp\bin\mysql\
Start WAMPServer again.
Now in the menu
Wampserver -> MySQL -> Version
you should see you old mysql version and the new one that came with the new install as well.
Switch to the old version by clicking on the old version number on that menu.
Wamp shoud now switch from the new MySQL to the old. Wait for WAMPServer to go green again.
Check the Mysql error log, to see if anything unpleasant has happened, if not,
You can then use phpmyadmin, or whatever tool you are used to to backup your missing databases.
Then switch back to the new version of MySQL and restore the databases to this version of mysql.
I hope this goes smoothly, it should.

Restore Database in WAMP

I had few databases related to different projects in the WAMP. I don't know what happened, Today, when I go to PhpMyAdmin, I was just able to see the default databases and rest of my databases are not showing and even the php code related to those databases are throwing database not found errors. But when I go to "D:\wamp\bin\mysql\mysql5.1.30\data" the folders with my DB names are there. But not sure how to restore those DBs and I don't have any backup of the DB, Can any one help me how to restore them?
You can copy these file to another location and reinstall the same WAMP version after installtation copy them back to original location.
Please note that your WAMP version should be same, because if the version will change then mysql version will also be change.
Another method is to utilise Window's "Restore previous versions" feature. Right click the wamp folder (usually in C:\, click Restore previous versions and select the most recent date you know it was working.
Note: This will also revert mysql data - so you'll lose any changes after the date you select, but I have used this in the past when I needed to get my whole wamp system back to a working state when something had broken it.
Have you checked my.ini file? Just find datadir it should refer to db folder (e.g datadir=D:/Wamp/bin/mysql/mysql5.1.30/data) - goodluck :)
Copy the complete data folder from old wamp mysql folder to new mysql folder and then inside data folder change the name of the file mysql-bin.index to mysql-bin.index-corrupt. Then restart WAMP. That's all.
reinstall Wamp Server that must be same version. After reinstall if wamp show red icon 1. go to wamp -> apache -> services ->test port 80.
if its available . then apache -> services -> install services.
2. mysql-> services -> install services.
after that restart wamp..
100% work
Copy data folder and reinstall same version of WAMP.
Once installation is completed, go to data folder: inside replace only ibdata1 file from existing folder.
After starting WAMP, check phpmyadmin: you'll get all database and tables with data.