Where does Sequel Pro / MAMP store local databases?

天大地大妈咪最大 提交于 2019-12-03 05:51:35

问题


I had a few databases created on my computer via Sequel Pro & MAMP, and was running localhost to view them. However, I did a fresh install of Mac OS Lion, and I forgot to backup the databases to .sql files.

I do backup my files regularly, and have a copy of the computer pre-install. Does anyone know the path to the db files? Are they stored in a format that I could rebuild, so I could import into Sequel Pro?


回答1:


Brian W's answer didn't really help with me using MAMP Pro (v2.1.4), but luckily someone else did. Location for mine were:

/Library/Application Support/appsolute/MAMP PRO/db/mysql

They also said that they've moved it to Dropbox and then used a unix symlink for the original location (not a Mac OS X alias as they don't work), that way it does get backed up as well.




回答2:


Okay, I figured it out. If you are using MAMP and localhost to create databases, you just need to go to MAMP > db > mysql folder and in there will be all your databases.

Hope that helps anyone who uses Sequel Pro / MAMP / Localhost!




回答3:


To carry over previous databases from Standard MAMP to MAMP PRO:

copy over /Applications/MAMP/db/mysql/ into /Library/Application Support/appsolute/MAMP PRO/db/mysql/

To carry over previous database users you need to copy over: /Applications/MAMP/db/mysql/mysql/ into
/Library/Application Support/appsolute/MAMP PRO/db/mysql/mysql




回答4:


You can also find more informations about the MAMP Directories (including the db files, error logs, etc.) in the Sequel Pro Docs (MAMP, MAMP PRO, XAMPP, Zend, etc.):
https://sequelpro.com/docs/ref/mysql/mysql-files

That helped me quiet a lot.




回答5:


you can get the path to your data dynamically by running this command

mysqladmin -h host -u root -p variables

of course you have to change host to your host (most likely to be) localhost and root to your username or root in case your using it as the default user after entering your pass in the prompt you will get a long list of variables search for datadir that's where your databases are stored




回答6:


MAMP store its databases into this folder:

/Applications/MAMP/db/mysql



来源:https://stackoverflow.com/questions/7341897/where-does-sequel-pro-mamp-store-local-databases

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