Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.5: Control MySQL server with launchd' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: Control MySQL server with launchd
Authored by: Anonymous on Feb 05, '08 10:22:34AM

How did you install that MySQL version on Leopard? I just tried and it completely destroyed my database, now none of my (small sites hosted on my comp) work at all.

I can't uninstall or downgrade because the installer tells me I can't install an older version on the newer on.e

---
Life only demands from you the strength you possess. Only one feat is possible - not to have run away.



[ Reply to This | # ]
10.5: Control MySQL server with launchd
Authored by: leamanc on Feb 05, '08 12:45:50PM

Unless you have a backup of your mysql data directory or have .sql dumps (you do, don't you?), you are pretty well hosed.

Upgrading mysql using MySQL's pkg installers has been a nightmare. You usually have to trash the receipt out of /Library/Receipts (this will fix your problem of not being able to install/upgrade) before running the new package. Sometimes it works fine, other times all your databases go missing after the upgrade is done.

I generally don't upgrade MySQL on a Mac once I've got it running, unless there is a glaring security hole or some great new feature. If I do plan to upgrade though, first step is to get .sql dumps of all my databases. Once the server has been upgraded (and if my databses are missing), I then run the .sql dumps and am back in business.



[ Reply to This | # ]
10.5: Control MySQL server with launchd
Authored by: Anonymous on Feb 06, '08 07:37:04AM

I had a ~30 hour old complete SQL dump so I was able to quickly get back online after removing all traces of the new installation and then installing the older version again. Lost some data though. The .MYI files all disappeared during the installation project.

Well I guess that is what you get for not having a fresh backup when installing new versions.

---
Life only demands from you the strength you possess. Only one feat is possible - not to have run away.



[ Reply to This | # ]
10.5: Control MySQL server with launchd
Authored by: derekhed on Feb 05, '08 01:44:33PM
Look in /usr/local/ for directories named 'mysql*'. All the installers I have used create a new directory named after that version and link 'mysql' to the new directory.

Your data will still exist in your old directory. See http://www.entropy.ch/software/macosx/mysql/ for more detailed instructions.

The good news is that unless you have deleted something, your data is probably still there.

[ Reply to This | # ]
10.5: Control MySQL server with launchd
Authored by: Anonymous on Feb 06, '08 07:40:46AM

That is what I expected would happen as is has before (when I used 10.4) but no old SQL folder was present, only the newly created one.

---
Life only demands from you the strength you possess. Only one feat is possible - not to have run away.



[ Reply to This | # ]
10.5: Control MySQL server with launchd
Authored by: mmnw on Feb 06, '08 12:43:36AM

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).



[ Reply to This | # ]
10.5: Control MySQL server with launchd
Authored by: mmnw on Feb 06, '08 01:09:06AM

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.




[ Reply to This | # ]