I have done something stupid: I have started uninstalling XAMPP without exporting the DB. Realising what I had done during uninstallation, I told the installer not to delete the databases. Now I have a mysql folder with the data, but no MySQL program to handle it.
What do I do with it now? Can I simply copy it to another installation? I guess not, so what shall I do?
I tried searching the web for this, but did not find anything useful. There must be a reason for the uninstaller asking this, so how do I do it?
using xamp I once copied the all files from
mysql\mysql5.5.16\data\
to same directory my other computer. and was surprised to see it work.
but there must be some condition about same version or datadir settings.
Check your backup folder for the existence of .frm .MYI & .MYD files if the backup contains these files just install the same version of mysql and copy those files to your data folder it worked for me. May be you too.
Related
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
I have my old databases in D:/data and I just did a fresh install of xampp in C:/xampp, I've changed to datadir = "D:/data" in my new my.ini file but it doesn't work properly.
PhpMyadmin shows all my old databases, but when I try to delete one it says it's corrupted, and my php files doesn't connect to my databases...
What I'm doing wrong?
same thing happend for me also
It is because of You might forgot to copy the ibdata* file. You may expect this file to be located within the respective database folders just like the other related files, but you would be wrong.
My ibdata file was located at mysql/data/ibdata1; as soon as I copied that to the new location everything was good again.
Hope it will help!! :)
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.
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.
I am using wamp in windows 7. Due to some reason my os is corrupted but still i have ubuntu in my pc and wamp was in another drive.
Now I can get source of my project but how to get database from mysql. I think I can use .frm and other files that can be restore in ubuntu.
Anyone could you please explain how can I restore my wamp/mysql data to ubuntu.
Yeah you should be able to copy your .frm, .myd, and myi from your windows box to your linux box. Assuming you used something like XAMPP, the files are stored in \mysql\data
These would need to be copied to /var/lib/mysql
You might need to recreate your user(s) though.