简体   繁体   English

使用MAMP Pro 3将MySQL数据库与Dropbox同步

[英]Sync mysql databases with Dropbox with MAMP Pro 3

I'm having issues getting my dropbox mysql database sync working after updating my MAMP (Pro) installations from 2.2 to 3.0.2. 将MAMP(Pro)安装从2.2更新到3.0.2后,我的保管箱mysql数据库同步工作出现问题。

I've been working with the following setup for quit some time now and it worked perfectly until I updated: 我一直在使用以下退出设置一些时间,并且在我更新之前它一直运行良好:

Work computer: 工作计算机:
Mac Pro G5 running MacOS 10.8.5 运行MacOS 10.8.5的Mac Pro G5
with UsernameA 与用户名A
MAMP & MAMP Pro installed as normal MAMP和MAMP Pro正常安装
Dropbox folder in user root: /Users/UsernameA/Dropbox with a symlink to second partition: /Volumes/Diskname/Dropbox 用户根目录中的Dropbox文件夹: /Users/UsernameA/Dropbox ,具有指向第二个分区的符号链接: /Volumes/Diskname/Dropbox
Symlinks to Dropbox from: 从以下链接到Dropbox的符号链接:

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

Home computer: 家用电脑:
Mac Mini running MacOS 10.9.2 运行MacOS 10.9.2的Mac Mini
with UsernameB 与用户名B
MAMP & MAMP Pro installed as normal MAMP和MAMP Pro正常安装
Dropbox folder in user root: /Users/UsernameB/Dropbox Symlinks to Dropbox from: 用户根目录中的Dropbox文件夹: /Users/UsernameB/Dropbox Dropbox从以下位置到Dropbox的符号链接:

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

MAMP Pro Settings on both computers 两台计算机上的MAMP Pro设置

Default Apache port for http connections: 80  
Default Apache port for https connections (SSL): 443  
MySQL port: 3306  
Run Apache/MySQL server as user: www (Apache) / mysql (MySQL)  
MySQL Password user root: notroot

On my work computer everything works fine and both Apache and MySQL server startup normally. 在我的工作计算机上,一切正常,并且Apache和MySQL服务器均正常启动。 However when I tried to start MAMP Pro at home, I keep getting the MYSQL couldn't be started error. 但是,当我尝试在家中启动MAMP Pro时,我总是收到无法启动MYSQL的错误。 In MAMP the MySQL server won't start either. 在MAMP中,MySQL服务器也不会启动。 This is in my mysql_error.log : 这是在我的mysql_error.log中

140320 11:09:14 mysqld_safe Starting mysqld daemon with databases from /Library/Application Support/appsolute/MAMP PRO/db/mysql
140320 11:09:14 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
140320 11:09:14 [Warning] Setting lower_case_table_names=2 because file system for /Library/Application Support/appsolute/MAMP PRO/db/mysql/ is case insensitive
140320 11:09:14 [Note] Plugin 'FEDERATED' is disabled.
/Applications/MAMP/Library/bin/mysqld: Table 'plugin' is read only
140320 11:09:14 [ERROR] Can't open the mysql.plugin table. Please run mysql_upgrade to create it.
140320 11:09:14 InnoDB: The InnoDB memory heap is disabled
140320 11:09:14 InnoDB: Mutexes and rw_locks use GCC atomic builtins
140320 11:09:14 InnoDB: Compressed tables use zlib 1.2.3
140320 11:09:14 InnoDB: Initializing buffer pool, size = 128.0M
140320 11:09:15 InnoDB: Completed initialization of buffer pool
140320 11:09:15 InnoDB: highest supported file format is Barracuda.
140320 11:09:15 InnoDB: Waiting for the background threads to start
140320 11:09:16 InnoDB: 5.5.34 started; log sequence number 100221878
140320 11:09:16 [ERROR] Fatal error: Can't open and lock privilege tables: Table 'host' is read only
140320 11:09:16 mysqld_safe mysqld from pid file /Applications/MAMP/tmp/mysql/mysql.pid ended

I know for sure it has something to do with the /Library/Application Support/appsolute/MAMP PRO/db/mysql folder, because when I remove the symlink and use the default installed mysql folder on my home computer, the MySQL server starts as normal. 我肯定知道它与/ Library / Application Support / appsolute / MAMP PRO / db / mysql文件夹有关,因为当我删除符号链接并在家用计算机上使用默认的已安装mysql文件夹时,MySQL服务器启动为正常。
I tried everything: 我尝试了一切:

  1. Removed & reinstalled MAMP & MAMP Pro completely 完全删除并重新安装了MAMP&MAMP Pro
  2. Checked if there were any other mysql servers running in Activity Monitor 检查活动监视器中是否还有其他mysql服务器在运行
  3. Verify and Repair disk permissions in Disk utility 在“磁盘”实用程序中验证并修复磁盘权限
  4. Exported all my databases and imported them in a fresh MAMP install and used that mysql folder as new sync folder 导出所有我的数据库,并将它们导入到全新的MAMP安装中,并将该mysql文件夹用作新的同步文件夹

But nothing helps! 但是没有帮助!
I read somewhere that the path to Dropbox has to be exactly the same on both computers, but that worked fine like this before the update? 我在某处读到,Dropbox的路径必须在两台计算机上都完全相同,但是在更新之前像这样工作正常?
Also someone mentioned that the usernames on both computers have to be the same, but that also worked fine before the update? 还有人提到两台计算机上的用户名必须相同,但是在更新之前也可以正常工作吗?

Any ideas what's causing this? 任何想法是什么原因造成的?
Thanks! 谢谢!

I had similar problem with new Xampp installation, I was trying to change these lines in my.ini : 我在安装新的Xampp时遇到了类似的问题,我试图在my.ini中更改这些行:

datadir="C:/xampp/mysql/data"
innodb_data_home_dir = "C:/xampp/mysql/data"
innodb_log_group_home_dir = "C:/xampp/mysql/data"

Into: 进入:

datadir="D:/Dropbox/web-data"
innodb_data_home_dir = "D:/Dropbox/web-data"
innodb_log_group_home_dir = "D:/Dropbox/web-data"

You need to copy all initial content inside data folder into the new web-data folder. 您需要将数据文件夹中的所有初始内容复制到新的Web数据文件夹中。 You can compare with your installation, hope it will work. 您可以将其与您的安装进行比较,希望它可以工作。

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

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