Sync mysql databases with Dropbox with MAMP Pro 3

醉酒当歌 提交于 2019-12-25 02:15:21

问题


I'm having issues getting my dropbox mysql database sync working after updating my MAMP (Pro) installations from 2.2 to 3.0.2.

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
with UsernameA
MAMP & MAMP Pro installed as normal
Dropbox folder in user root: /Users/UsernameA/Dropbox with a symlink to second partition: /Volumes/Diskname/Dropbox
Symlinks to Dropbox from:

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

Home computer:
Mac Mini running MacOS 10.9.2
with UsernameB
MAMP & MAMP Pro installed as normal
Dropbox folder in user root: /Users/UsernameB/Dropbox Symlinks to Dropbox from:

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

MAMP Pro Settings on both computers

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. However when I tried to start MAMP Pro at home, I keep getting the MYSQL couldn't be started error. In MAMP the MySQL server won't start either. This is in my 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.
I tried everything:

  1. Removed & reinstalled MAMP & MAMP Pro completely
  2. Checked if there were any other mysql servers running in Activity Monitor
  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

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?
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!


回答1:


I had similar problem with new Xampp installation, I was trying to change these lines in 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. You can compare with your installation, hope it will work.



来源:https://stackoverflow.com/questions/22536715/sync-mysql-databases-with-dropbox-with-mamp-pro-3

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