Cannot find old MySQL databases after upgrading MAMP

时间秒杀一切 提交于 2021-01-23 11:07:09

问题


  1. I installed Yosemite
  2. Renamed MAMP to MAMP_old
  3. Did a clean install of MAMP
  4. Copied the db folder from old into the the new one

Now none of my databases appear in PHPMyAdmin

Inside the db/mysql folder I see the folder for my old databases, but there are no sql files. For example a Wordpress folder contains .frm files and db.opt files.

I tried doing this (using the link below), but I don't seem to have a mysql folder usr/local/

/usr/local/mysql/bin/mysqldump -u root -p[pass] [db] > [filename].sql

Can't access MySQL databases after upgrade to Mountain Lion (using MAMP)

What should I do to restore my old databases? I have very limited knowledge in this area.

Many thanks


回答1:


I ran into this problem with upgrading to MAMP PRO 5 from 4. The following article proved invaluable: https://appsolute.zendesk.com/hc/en-us/articles/215198946-I-upgraded-to-MAMP-PRO-5-and-I-am-missing-databases-

To quote:

Your old MySQL 5.6 data is in

/Library/application support/appsolute/MAMP PRO/db/mysql56_2018_xxxx

To be on the safe side, first make backups of your host data, and your entire /Library/application support/appsolute/MAMP PRO/db/

To verify this is your old data, look inside of this mysql56_2018_xxx folder, you should see subdirectories of all of your old databases in this folder.

If you see missing databases in MAMP PRO 5, you can "reupgrade" your old data by doing the following.

  1. Quit MAMP PRO
  2. Rename your mysql57 folder to mysql57_back
  3. Make a copy of your mysql56_2018_xxxx folder, name it mysql57.
  4. Start MAMP PRO, start your servers
  5. Run Tools > Upgrade MySQL DB

Notes:

  • Instructions available online for MAMP (not MAMP PRO) may be misleading.

  • The above refers not to the /Library inside the package contents of the MAMP PRO app, but /Library from the root of your drive.

  • In my case the complete original databases were in the folder simply named mysql56. There were additional incomplete date-stamped folders suggestive of failures during the original DB update process.




回答2:


Here is a link to an article which I think can help anyone in a similar situation:

How to Upgrade MAMP

So the basic idea is that you will need to copy your db files from the old MAMP folder to the new MAMP folder.

Another technique you could use would be do a mysqldump before upgrading, then import that dump file into the new version of MAMP.



来源:https://stackoverflow.com/questions/27210289/cannot-find-old-mysql-databases-after-upgrading-mamp

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!