简体   繁体   English

MAMP / MAMP Pro数据库冲突

[英]MAMP / MAMP Pro database conflicts

I sometimes get the databases in phpMyAdmin that are stored under /Library/Application Support/appsolute/db/mysql, this should be the path for MAMP PRO. 有时我会在phpMyAdmin中获得存储在/ Library / Application Support / appsolute / db / mysql下的数据库,这应该是MAMP PRO的路径。 However, I don't use MAMP PRO. 但是,我不使用MAMP PRO。 I have tried the trial once, and continued using the free version. 我曾经试用过一次试用版,并继续使用免费版。

However, sometimes I get the databases visible under /Applications/MAMP/db/mysql, they are a bit off, and I am missing a database there I was working on the other day, but the database is visible in the MAMP Pro database. 但是,有时我可以在/ Applications / MAMP / db / mysql下看到可见的数据库,但它们有些不正常,并且我缺少前几天正在使用的数据库,但是该数据库在MAMP Pro数据库中可见。

I have tried copying the database to the MAMP free database folder, but this results in giving errors in phpMyAdmin. 我试图将数据库复制到MAMP免费数据库文件夹中,但这会导致phpMyAdmin中出现错误。 It does show the tables in the database, but it cant display the structure of the tables. 它确实显示了数据库中的表,但是无法显示表的结构。


Update: 更新:

Still experiencing this issue. 仍然遇到此问题。 Right now I just started my Mac and started MAMP, wanted to continue working on a project and it loads the other database (I think this is the database stored in MAMP Pro), when yesterday it was loading the MAMP databases. 现在,我刚刚启动Mac并启动了MAMP,想要继续进行项目,并加载另一个数据库(我认为这是存储在MAMP Pro中的数据库),而昨天它正在加载MAMP数据库。

I have no idea how and why this is happening, and how I can find the issue. 我不知道这种情况的发生方式和原因,以及如何找到问题。


Long story short: MAMP uses the MAMP Pro databases sometimes in /Library/Application Support/appsolute/MAMP PRO/db/mysql instead of /Applications/MAMP/db/mysql/ , note that I don't have MAMP Pro, I have the regular MAMP. 长话短说:MAMP有时在/Library/Application Support/appsolute/MAMP PRO/db/mysql而不是/Applications/MAMP/db/mysql/使用MAMP Pro数据库,请注意,我没有MAMP Pro,常规的MAMP。 Sometimes it uses the MAMP database folder, sometimes it uses the MAMP Pro databases folder. 有时它使用MAMP数据库文件夹,有时它使用MAMP Pro数据库文件夹。

MAMP is using this mysql database: /Applications/MAMP/db/mysql MAMP正在使用以下mysql数据库:/ Applications / MAMP / db / mysql

MAMP PRO is using this databse: /Library/Application Support/appsolute/MAMP PRO/db/mysql MAMP PRO正在使用此数据库:/ Library / Application Support / appsolute / MAMP PRO / db / mysql

this may help I'm not too sure - your databases should be in either one 这可能对我不太有帮助-您的数据库应该在两个数据库中

This sounds like a path related issue. 这听起来像是与路径有关的问题。

Check your system paths and fix any errors that are pointing to MAMP Pro. 检查系统路径,并修复所有指向MAMP Pro的错误。

Also, check your MAMP conf file and see how the datadir is set, is it set to the MAMP Pro location ? 另外,检查您的MAMP conf文件并查看datadir的设置方式,它是否设置为MAMP Pro位置?


SHOW GLOBAL VARIABLES LIKE 'datadir'; 显示像“ datadir”这样的全局变量;

datadir - /Library/Application Support/appsolute/MAMP PRO/db/mysql/ datadir-/库/应用程序支持/ appsolute / MAMP PRO / db / mysql /

An example of a custom conf file used to change this 用于更改此内容的自定义conf文件的示例

default-storage-engine=MyISAM innodb=OFF datadir=/Users/someuser/drive/mysql/

Let me know in the comments if this helps and we can work out the error as we go along, I'll edit the answer accordingly if need be. 请在评论中让我知道是否有帮助,我们可以逐步解决错误,如果需要,我将相应地编辑答案。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM