Open main menu

lensowiki β

Changes

lensowiki:Installation caveats

1,668 bytes added, 21:49, 13 June 2010
Short article URLs: mysql crap
===References===
*http://bugzilla.wikimedia.org/show_bug.cgi?id=11428
 
==Updating MySQL on Mac OS X==
I just went through a prolonged ordeal to upgrade MySQL from 5.1.30 to 5.1.47, so I'm going to write down some steps so that I don't hit so many dead-ends in the future.
 
The installer does not detect the presence of an older installation, and as a result, leaves the old data directory untouched. In retrospect, you could probably just move it and all would be well. Alternatively, you can recreate your databases as well. Here's what I did.
 
# First, to run the mysql_upgrade script, enable the root user in Directory Utility (which is now in CoreServices, or accessible from the Account prefs prefpane).
# <tt>su -</tt>
# <tt>su _mysql -c "/usr/local/mysql/mysql_upgrade"</tt>
# <tt>logout</tt>
# Restart MySQL
Now, [http://dev.mysql.com/doc/refman/5.1/en/default-privileges.html secure the root/guest accounts], [http://dev.mysql.com/doc/refman/5.1/en/create-user.html create the wiki user] and [http://www.mediawiki.org/wiki/Manual:Installing_MediaWiki#MySQL the wiki db and grant privileges]. Go into LocalSettings.php and change the connection settings so that it doesn't try to connect to the DB until you are done with the rest. Then
# <tt>sudo mkdir /usr/local/mysql/etc</tt>
# <tt>sudo mkdir /usr/local/mysql/etc</tt>
# <tt>su -</tt>
# <tt>su -m _mysql -c "touch /usr/local/mysql/etc/my.cnf"</tt> (you can safely ignore the <tt>getcwd</tt> error)
# <tt>logout</tt>
# Turn off root user
# Add this to the <tt>my.cnf</tt> file:
:<code>[mysqld]<br/>max_allowed_packet=10737418</code>
# Restart MySQL again
# Fire up SequelPro and import the SQL dump made earlier. Errors related to disallowed <tt>DROP</tt> operations are fine.
{{cs projects}}
[[Category:MediaWiki User's Guide]]
1,277
edits