This instruction describes how to migrate to latest mysql5 using freebsd ports.
first, install mysql and backup all databases.
By default in freebsd the mysql data dir is "/var/db/mysql"
In my case, it's "/home/mysql"
so
also you could use mysql_dbdir="/home/mysql" vars in rc.conf
Stopping DA mysql version:
Starting freebsd mysql ports version:
To ensure please see:
In my case:
080708 9:05:17 InnoDB: Starting shutdown...
080708 9:05:20 InnoDB: Shutdown completed; log sequence number 0 1559936068
080708 9:05:20 [Note] /usr/local/mysql-5.0.22-freebsd6.0-i386/bin/mysqld: Shutdown complete
080708 09:05:20 mysqld ended
080708 09:06:58 mysqld started
080708 9:06:59 InnoDB: Started; log sequence number 0 1559936068
080708 9:06:59 [Note] /usr/local/libexec/mysqld: ready for connections.
Version: '5.0.51a' socket: '/tmp/mysql.sock' port: 3306 FreeBSD port: mysql-server-5.0.51a
All works fine!
Warning!!
Please keep in mind that changing mysql dirs could cause php-mysql extension work broken, so you could want recompile php-extensions.
(Probably you should correct mysql dir in /usr/local/directadmin/customapache/configure.php and rebuild the php)
I've solve this problem completely moving to php5 and php5-extensions installed through ports to. Php is running as fastcgi.
Some addons (250708):
thanks to tsiou!
first, install mysql and backup all databases.
Code:
#make install clean -C /usr/ports/databases/mysql50-server/
By default in freebsd the mysql data dir is "/var/db/mysql"
In my case, it's "/home/mysql"
so
Code:
#ln -s /home/mysql /var/db/mysql
Code:
#cp /etc/my.cnf /home/mysql
#chown mysql:mysql /home/mysql/my.cnf
Stopping DA mysql version:
Code:
#/usr/local/etc/rc.d/mysqld stop
#chmod -x /usr/local/etc/rc.d/mysqld
Starting freebsd mysql ports version:
Code:
#/usr/local/etc/rc.d/mysql-server start
To ensure please see:
Code:
#tail -f /var/db/mysql/`uname -n`.err
In my case:
080708 9:05:17 InnoDB: Starting shutdown...
080708 9:05:20 InnoDB: Shutdown completed; log sequence number 0 1559936068
080708 9:05:20 [Note] /usr/local/mysql-5.0.22-freebsd6.0-i386/bin/mysqld: Shutdown complete
080708 09:05:20 mysqld ended
080708 09:06:58 mysqld started
080708 9:06:59 InnoDB: Started; log sequence number 0 1559936068
080708 9:06:59 [Note] /usr/local/libexec/mysqld: ready for connections.
Version: '5.0.51a' socket: '/tmp/mysql.sock' port: 3306 FreeBSD port: mysql-server-5.0.51a
All works fine!
Warning!!
Please keep in mind that changing mysql dirs could cause php-mysql extension work broken, so you could want recompile php-extensions.
(Probably you should correct mysql dir in /usr/local/directadmin/customapache/configure.php and rebuild the php)
I've solve this problem completely moving to php5 and php5-extensions installed through ports to. Php is running as fastcgi.
Some addons (250708):
Code:
cd /usr/local/etc/rc.d
mv mysqld mysqld_da_old
ln -s mysql-server mysqld
Last edited: