0

I'm trying to share my WordPress MySQL database between Mac and a Windows PC using Dropbox.

The database is on Dropbox and is symlinked to both MAMP on Mac and XAMPP on PC.

Everything works perfectly fine on Windows, but some tables won't load on Mac. There's a small difference in Apache/MySQL version but I guess that's not the case? The database was originally made on Windows if that's important.

Here's how it looks like on Mac:

enter image description here

The same DB on Windows:

enter image description here

Notice the wp_users, wp_posts, wp_comments, wp_links tables - they're broken. Also there's something funny about other tables sizes...

REPAIR TABLE wp_users ends up with:

"Your SQL query has been executed successfully"

And below I get some error (phpmyadmin):

Table | Op | Msg_type | Msg_text
mydbname.wp_users | repair | Error | Incorrect information in file: './mydbname/wp_users....
mydbname.wp_users | repair | error |Corrupt

And some data about my MySQL, Mac first:

Database server
Server: Localhost via UNIX socket
Server type: MySQL
Server version: 5.5.33 - Source distribution
Protocol version: 10
User: root@localhost
Server charset: UTF-8 Unicode (utf8)

And Windows:

Server: 127.0.0.1 via TCP/IP
Server type: MySQL
Server version: 5.6.16 - MySQL Community Server (GPL)
Protocol version: 10
User: root@localhost
Server charset: UTF-8 Unicode (utf8)

What's wrong? Any helping hand? :)

Wordpressor
  • 7,173
  • 23
  • 69
  • 108
  • Hi, I'm trying to help you. InnoDB storage engine doesn't support repair table options. Please read this article: http://dev.mysql.com/doc/refman/5.6/en/forcing-innodb-recovery.html – Péter Simon Jul 25 '14 at 23:51
  • In the meantime, I found this: http://stackoverflow.com/a/2314308/2736355 – Péter Simon Jul 25 '14 at 23:55
  • Don't do this.. Put one as the server and have it listen on an non-localhost ip address. Set up the other to access it – hd1 Jul 26 '14 at 01:36
  • I want to avoid doing this. I want to store the DB in Dropbox so it will work even offline. Storing the db online is kind of pointless for me. – Wordpressor Jul 28 '14 at 23:27

1 Answers1

2

MySQL data files cannot be reliably moved back and forth between different versions of MySQL. If you want to share your database files between systems, make sure that they're all running the same version of MySQL.

  • Wow, this is maddness then, because I HAVE to use MAMP (work requirement), and the latest version comes with MySQL 5.5.34. Why is that, can't Mac have newer MySQL? Is it possible to convert my current 5.6.16 database to 5.5.33? What does it change, I can't wrap my head around it, it's the same code inside, has to be, so what's different? Thanks :) – Wordpressor Jul 28 '14 at 23:26
  • Current versions of MySQL can be installed on Mac OS (I'm currently using 5.6.19); they just aren't available in the "MAMP" package right now. Use `mysqldump` to dump your database on Windows, then restore it on the Mac. (Then keep your database files separate.) –  Jul 28 '14 at 23:29