How to create your own mysql package on freebsd or debian


Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"


Top Level » MySQL / MariaDB

How to create your own mysql package on freebsd or debianLast Modified: Jun 16, 2011, 1:23 pm
If you need an updated mysql package for your system, but one isn't available in the format you need, you can compile your own.  First go to dev.mysql.com and download the tar.gz package you want, eg:

wget http://<replacewithsite>/path/to/mysql-5.0.27.tar.gz
tar xvzf mysql-5.0.27.tar.gz
cd mysql-5.0.27

Then you need to configure mysql for your sytem. Type:

CFLAGS=-DHAVE_BROKEN_REALPATH ./configure --prefix=/usr/local/mysql --with-extra-charsets=all --enable-thread-safe-client --enable-local-infile --enable-assembler --with-named-z-libs=not-used --enable-shared --enable-static --with-innodb --with-plugins=innobase

If the configure succeeds, then you can compile it:

make

This will likely take a long time as mysql is very large.  Once it finishes, to create the binary package, type:

./scripts/make_binary_distribution

This will assemble all binary files and scripts and put them into a tar.gz for you, which should be in the directory you're currently in:

server# ls -la *.tar.gz
-rw-r--r--  1 root  100  23977052 Jul 31  2006 mysql-5.0.27-freebsd6.0-i386.tar.gz

The naming format will vary depending on the OS and version you're using.  Feel free to make any additional customizations to the configure options, if you know what you're doing ;)

If you get the following error on Debian

checking for termcap functions library... configure: error: No curses/termcap library found

Type

apt-get install libncurses5-dev

 
Related Helpfiles
How to downgrade/upgrade MySQL on FreeBSD

© 2018 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST