I have been working on a web application using ExtJS with a SQL Database hosted on phpMyAdmin using MAMP. About 2 weeks ago, I had to dump my old HD because of bad sectors and I got an SSD as a replacement. After installing my applications again (IDE's, Document Editing Softwares, MAMP, etc), I had to reinitialize my databases in phpMyAdmin.
Luckily, I had one of them online in production so I just exported the SQL from the server and I had a local copy again. However, there's this one other website that I do not have a backup to the SQL file of -- and I need to get that SQL file because I can't create it from memory (I think it had 30+ tables already).
I know I can plug in my old hard drive, boot from there, open MAMP, open phpMyAdmin, then export my database. However, that's too much work and I am not sure if that's a good idea.
Is there a way to extract the SQL file of a phpMyAdmin table by using the file directory/structure alone? I think MAMP is supposed to store the data somewhere so that phpMyAdmin knows where to get its SQL tables.
Update
I found my "database" under /Applications/MAMP/db/mysql/ProjectName/ but they're .frm and I'm clueless on how to open this.
Take a look at this answer: Restore the mysql database from .frm files
You'll need a couple more files other than the .frm, but you can solve it with the files alone, no need to plug in your old drive again.
Related
Unfortunately my VPS got corrupted and therefore I wasn't able to perform an export of the sql database with phpmyadmin. I do managed to copy all the SQL files .frm, .idb, .opt etc
Is it possible to recover the database and make my wordpress site working again?
Im using centos7 with Plesk Onyx / phpmyadmin
Absolutely! First get a new instance of your VPS running and create your database again, after created copy the .idb(innodb) or .myi/.myd(mysami) files right back where you found them
Each table comes with a .frm, don't forget those, as well as a db.opt for the database
Typical mysql storage (on linux) is located:
/var/lib/mysql/database_name
Once copied over restart mysql and check again
As title says, I had an unfortunate failure which resulted in me only being able to recover my MySQL data folder (IBD, FRM, and OPT files). I built a new server and installed MySQL 5.6 (old one used 5.5). I copied over the data folder hoping I would get lucky, and I do see my old schemas in MySQL workbench, but when trying to look at any table in them I get an error like this:
https://www.dropbox.com/s/q2eui8eyu621f3c/sqlerror.jpg?dl=0
I don't remember seeing any .data files on the recovered data and am wondering if it's possible for me to recover my old tables. I'm not sure whether or not the old or new is InnoDB or myisam and am not exactly sure how to tell.
Any tips appreciated.
In case someone else who doesn't know how to restore their databases runs into a similar issue, I was able to recover my data. Instead of copying and pasting everything in which did not work, I stopped the MySQL service, pasted all the database folders in, and only the "ibdata1" file. Then I restarted the service and loaded up workbench and all my data as restored in 5.6.
I used BDE before and deployed it with my apps and databases, and everything was very easy to setup. Now, I have Delphi XE7, FireDAC components and a MySQL database. Since I have WAMP, MySQL works for me and my database is located withing my local server. I would like to use my app on another computer, which has no servers running. Is it possible to do? I tried it today and all got is a few more gray hairs. I tried to do things listed here: http://docwiki.embarcadero.com/RADStudio/XE8/en/Connect_to_MySQL_Server_(FireDAC)
I have my .exe file. I have 'libmysqld.dll' in the same folder. I have 'data' folder which has another folder ('ccvs'), and in it I have .frm and .idb files (MySQL database with InnoDB storage engine).
I even tried with a 'my.ini' file. In the end, I installed MySQL server and administrator (I think it was the name of the application). I copied my database to 'c:\programdata\mysql...\data' and I could finally browse it, but I could not access the database. Even though I could visually see it, program told me it does not exist.
I tried this as well: www.da-soft.com/forums/anydac-general-english/howto-configure-and-setup-a-mysql-embedded-server.html
Downloaded the sample app, but those components do not exist anymore and I cannot load the project successfully.
Also this looked great, but my components don't have those options... https://www.devart.com/mydac/docs/loggingembeddedserver.htm
I would like to avoid installing MySQL and embed the database if possible.
I recently installed a new version of XAMPP. I copied and pasted database folders from the old xampp's mysql/data to the same folder in the newer version. The database names are displayed in phpMyAdmin but it does not show any data.
I know I can do a simple import/export sql to resolve this but I'd like to know why copying and pasting the database folders not working? Do I have to do something else in order to make this work?
I'm going to backup my database regularly using an auto backup tool. Apart from backing up mysql/data folder, do I also need to backup some other folders or files to have a proper database backup?
why copying and pasting the database folders not working? >> as far as I know we need to use import feature, because it will register the database to mysql's infomation_schema.
So even if the database file is stored in the correct folder, it won't show up on the phpmyadmin because it's not registered. And I think mysql didn't do any directory scanning to determine it's database line up.
To back up automatically, there are several ways you can do. Moreover if you use linux OS, you have more freedom to do that, for example create a php script to backup your db and then execute it regulary by using cron job.
hope this can help you.
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.