Opened 15 years ago
Closed 15 years ago
#19980 closed defect (invalid)
mysql5 failed after upgrade
Reported by: | Dormilich@… | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.7.1 |
Keywords: | Cc: | robertlay@… | |
Port: | mysql5 mysql5-server |
Description
after upgrading "mysql @5.0.67_1+server" (to "mysql5 @5.0.83_0") the MySQL server failed to start. found that neither the LaunchDaemon was linked, nor the socket file existed. after installing "mysql5-server @5.0.83_0" I got the link to the LaunchDaemon, but still no socket file (using the old socked file gave error (38)). deactivating "mysql5 @5.0.83_0" broke down the whole mysql (so I re-activated it).
any idea what else to do to get it running again?
Change History (9)
comment:1 Changed 15 years ago by blb@…
Owner: | changed from macports-tickets@… to ryandesign@… |
---|---|
Port: | mysql5 mysql5-server added |
comment:2 follow-up: 3 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
comment:3 follow-up: 5 Changed 15 years ago by Dormilich@…
Replying to ryandesign@…:
Did you remember to stop the mysql 5.0.67 server before upgrading? If not, you need to stop that server now. You can restart the machine to do this, or you could probably also do it with mysqladmin.
up to now I didn't need to, though the new version was only available after a reboot.
What command did you use to try to start the mysql 5.0.83 server? The easiest way to start and stop the server is "sudo port load mysql5-server" and "sudo port unload mysql5-server".
that info should make it into the MAMP Howto …
found that neither the LaunchDaemon was linked,
What do you mean "linked"? Do you just mean that the launchd plist didn't exist? If so, then that's correct; it's been moved to the new mysql5-server port.
the LaunchDaemon (/Library/LaunchDaemons/org.macports.mysql5.plist) is a symlink to the plist somewhere in the Macports directory (autostart). anyways, installing mysql5-server creates that.
after installing "mysql5-server @5.0.83_0" I got the link to the LaunchDaemon, but still no socket file (using the old socked file gave error (38)).
Where are you looking for the new socket file? Where are you finding the old socket file?
/opt/local/var/run/mysqld.sock
personal backup (yes, Apple's time machine sometimes proves useful)
deactivating "mysql5 @5.0.83_0" broke down the whole mysql (so I re-activated it).
What do you mean "broke down"?
"/opt/local/bin/mysql not found" (something along that line)
comment:4 follow-up: 6 Changed 15 years ago by Dormilich@…
"sudo port load mysql5-server" basicly solved the problem, despite that the upgrade itself failed to install "mysql5-server" (i.e. it only installed "mysql5"). I recommend putting that (about (un)loading the server) into the HowTo section.
comment:5 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to Dormilich@…:
up to now I didn't need to, though the new version was only available after a reboot.
You should probably always stop (i.e. port unload) an old version of any server installed by MacPorts before starting (i.e. port load) the new version.
that info should make it into the MAMP Howto …
Feel free to edit the MAMP how-to; anybody can edit the wiki. It currently mentions the longer form "sudo launchctl load -w /Library/LaunchDaemons/org.macports.mysql5.plist"; "sudo port load mysql5-server" is simply a shorter form of that same command.
Of course, those launchctl commands and their "port load" and "port unload" equivalents apply to all MacPorts server ports, not just apache2 and mysql5.
the LaunchDaemon (/Library/LaunchDaemons/org.macports.mysql5.plist) is a symlink to the plist somewhere in the Macports directory (autostart). anyways, installing mysql5-server creates that.
Yes, the symlink and the thing it points to were moved from the +server variant of the mysql5 port to the new mysql5-server port, as had been long requested; see #12313.
/opt/local/var/run/mysqld.sock
personal backup (yes, Apple's time machine sometimes proves useful)
Ah yes. No, I would not expect a backup of a socket file to be much use.
"/opt/local/bin/mysql not found" (something along that line)
Indeed, that's the purpose of deactivating a port -- to remove its files from their places within /opt/local. :)
comment:6 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
Replying to Dormilich@…:
"sudo port load mysql5-server" basicly solved the problem,
Ok, that's good to know. Then the port is working correctly.
despite that the upgrade itself failed to install "mysql5-server" (i.e. it only installed "mysql5").
I'm afraid it was not possible to have the mysql5 port install the mysql5-server port for you. That is why I had the mysql5 port output this message if you attempt to use the now-obsolete +server variant:
The +server variant is obsolete. Please install the mysql5-server port instead.
I recommend putting that (about (un)loading the server) into the HowTo section.
While that recommendation does apply to all server ports, it wouldn't be a bad idea to add a bit about upgrades to the how-to. It currently mentions a bit about conf files when upgrading apache2, but doesn't mention anything about upgrading mysql5, which should probably at least mention the use of mysql_upgrade. Again, feel free to edit the wiki.
comment:7 Changed 15 years ago by robertlay@…
I hope it's ok for me to post on this ticket as well. Let me know if it's not. I'm doing so because I'm having a similar problem. However, I have performed a brand new install - no upgrading. In installing mysql5-server @5.0.83_0 and then as you say, run "sudo port load mysql5-server" to start mysql and thus create the mysqld.sock file, but I'm not getting a sock file at all. I am completely unable to run mysql as a result. I have completely uninstalled and reinstalled properly. Any suggestions? I've been trying to get Apache2, PHP5, and MySQL5 installed and the only one I'm having problems with is MySQL. Thanks!
comment:8 Changed 15 years ago by robertlay@…
Oh, and I meant to add that I keep getting a ".turd_mysql5-server" file in /opt/local/var/run/mysql5 instead of the needed sock file. Is that to be expected. Several people I've talked to say they've never heard of that. Thanks.
comment:9 Changed 15 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | robertlay@… added |
---|---|
Resolution: | → invalid |
Status: | new → closed |
Robert, Mr. Dormlich's question about upgrading mysql has been answered so this ticket is closed. I suspect the issue you're experiencing is unrelated and you should read the MAMP how-to in the wiki and ask on macports-users if you need help.
Yes, .turd files are a normal part of the way MacPorts installs empty folders. Mailing list archives should have the explanation, or you can ask about that there as well.
Replying to Dormilich@…:
Did you remember to stop the mysql 5.0.67 server before upgrading? If not, you need to stop that server now. You can restart the machine to do this, or you could probably also do it with mysqladmin.
What command did you use to try to start the mysql 5.0.83 server? The easiest way to start and stop the server is "sudo port load mysql5-server" and "sudo port unload mysql5-server".
What do you mean "linked"? Do you just mean that the launchd plist didn't exist? If so, then that's correct; it's been moved to the new mysql5-server port.
The socket won't exist until the server is started, of course.
Where are you looking for the new socket file? Where are you finding the old socket file?
What do you mean "broke down"?