|
|
|
10.5: Control MySQL server with launchd
Actually what I did, before installing leopard I made a full backup of my tiger machine. On Leopard I did a fresh mySQL Install without the old databases present. Then when this new copy was installed and running, I copied my old databases from the tiger backup into /usr/local/mysql/data. Don't forget to set the right file permissions, mysql likes it's database files to be owned by the _mysql user and read and writeable only by this user.
I actually had some problems with the authorization settings, meaning all the tables in the "mysql" db. For some reason mysql was messing this up. What I did there was renaming my backup mysql-folder, then copying it over in the data directory, restarting mysql and then copying all the table content of the backup tables to the new mysql tables by hand (with sql comands).
10.5: Control MySQL server with launchd
I have to add something I forgot in the last comment. As mentioned in the hint itself after the succesfull install I moved my data directory to a different location, in my case /Library/mySQL/data (this is because I do a daily backup of the /Library Folder, but not the system folders).
I guess this would eleminate the problems with loosing the database after an upgrade as described by derekhed in a previous comment. This would even work without the described launchd method, as long as you keep a /etc/my.cnf file, with the appropriate datadir option, since the pkg installer won't overwrite this file. In general I would advise to move the data folder out of the /usr/local/mysql*/ directory, this is not a good database location in general and especially on OS X. The whole directory structure of OS X is not layed out for this. I oriented my choice on the location of the apache documents folder, which is also located inside the /Library folder. |
SearchFrom our Sponsor...What's New:HintsNo new hintsComments last 2 days
Links last 2 weeksNo recent new linksWhat's New in the Forums?
The Editor's Corner...Here are some of my (robg) other projects...
Hints by TopicNews from Macworld
The macosxhints PollWhat version of OS X are you running as your main OS?
Other polls | 11,514 votes | 42 comments
|
|
Copyright © 2009 Mac Publishing LLC (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Powered by Geeklog Created this page in 0.83 seconds |
|