There are probably more than one ways to solve this, but my advice would be to install ports-mgmt/portmaster and then use the -o parameter:xy16644 said:How do I upgrade my MySQL 5.1.70 port to version 5.6.12?
-o <new port dir in /usr/ports> <installed port>
replace the installed port with a port from a different origin
# portmaster databases/mysql56-server mysql-server-5.1.70
.# mysqldump --opt -A -u root p > mysqldump.sql
(or a similar command, I'm just writing from mind what I'd use here). mysql_upgrade
command but I cannot get the MySQL service to start.sudo /usr/local/etc/rc.d/mysql-server start
/usr/local/etc/rc.d/mysql-server: WARNING: failed precmd routine for mysql
mysql_upgrade
but in order to do that the MySQL service needs to be running first. Any ideas? I had a look around the Internet for any solutions but have come up empty handed so far. mysql_upgrade
step to complete the upgrade? portmaster -r mysql-client
and portmaster -r mysql-server
but this didn't help.Is that really all there is to it or could there be more on the next line?xy16644 said:When I run:
Code:sudo /usr/local/etc/rc.d/mysql-server start
I get the following error in /var/log/messages:
Code:/usr/local/etc/rc.d/mysql-server: WARNING: failed precmd routine for mysql
# portmaster -r perl
.ShelLuser said:Is that really all there is to it or could there be more on the next line?
The reason I'm asking is because I'm slightly familiar with this type of error; it usually works in the form of: "failed ... routine for mysql. <Cause of error>".
Two things come to mind. As you mentioned yourself MySQL 5.6 depends on Perl these days. Have you updated Perl last month and when doing so, did you pay attention to /usr/ports/UPDATING? I've noticed that several people overlooked the requirement to rebuild all packages which depend on Perl, and that can result in weird behaviour.
So if you haven't done that already you should consider rebuilding your Perl port structure. For example by using portmaster:# portmaster -r perl
.
Second; you might want to check the permission settings for /var/db/mysql. It doesn't sound logical because there's no reason why those would change, but it can't hurt either.
# portmaster -r perl
). This took ages but it has been done.drwx------ 2 mysql wheel 71 Jul 26 2009 mysql
OR:
-rw-rw---- 1 mysql wheel 117 Jul 26 2009 mysql-bin.000001
# portmaster -r perl
again for the new version of MySQL that is now installed?Very good. Then there's no need to try and rebuild MySQL.xy16644 said:I did upgrade my version of Perl yesterday from 5.16.2 to 5.16.3 successfully. And yes, I did read /usr/ports/UPDATING and I did rebuild all my ports that depended on Perl (using# portmaster -r perl
). This took ages but it has been done.
Those look ok to me. Just to make sure check the directories inside the main mysql directory and make sure the directories and files in there are also owned by the mysql user.xy16644 said:Permissions on /var/db/mysql
----<SNIP
Any ideas?
# chown -R mysql /var/db/mysql
should fix any problems in there.# service mysql-server stop
or # /usr/local/etc/rc.d/mysql-server stop
) are you sure there aren't any stale processes left? ps ax | grep sql
tell you? Most likely nothing, but if it does return any results then that could be a problem (unless it returned this same command, that's obviously not important). # chown -R mysql /var/db/mysql
shortly after my most recent post so the permissions are now:-rw-rw---- 1 mysql mysql 29408 Jul 14 07:39 mysql-bin.000112
ps ax | grep sql
gives:82111 1 S+ 0:00.00 grep sql
Savagedlight said:You should always read the MySQL documentation for upgrade routines between minor (and major) versions.
You might have to reinstall MySQL 5.1 and follow the upgrade procedure. Read the documentation and find out.
mysql_install_db --basedir=/usr/local --user=mysql
2013-07-14 16:21:32 9955 [ERROR] /usr/local/libexec/mysqld: unknown option '--skip-locking'
2013-07-14 16:21:32 9955 [ERROR] Aborting
2013-07-14 16:21:32 9955 [Note] Binlog end
2013-07-14 16:21:32 9955 [Note] InnoDB: FTS optimize thread exiting.
2013-07-14 16:21:32 9955 [Note] InnoDB: Starting shutdown...
2013-07-14 16:21:34 9955 [Note] InnoDB: Shutdown completed; log sequence number 1600697
2013-07-14 16:21:34 9955 [Note] /usr/local/libexec/mysqld: Shutdown complete
service mysql --skip-grant-tables --user=mysql
mysql_upgrade