Custom Config for MySQL/MariaDB

labrocca

Verified User
Joined
Mar 12, 2006
Messages
151
I don't see a way to make custom configuration changes to MySQL/MariaDB the way you can for Apache and some of the other packages.

Under the custombuild/configure I have these:

ap2
clamav
curl
custombuild
dovecot
fpm
libxml2
libxslt
litespeed
nginx
nginx_reverse
opcache
proftpd
pureftpd
suhosin
suphp
systemd

But nothing for MySQL or MariaDB. I need this because default build of MariaDB fails unless I remove a few engines. I don't want to have to remember them all or have more failed build.

Please advise the best way to keep my changes I have outlined here:
http://forum.directadmin.com/showthread.php?t=54455&p=279123#post279123
 
Last edited:
You should be able to use custom/mysql/cmake.mysql for a custom cmake command in CB 2.0 rev. >=1655. For example:
Code:
#!/bin/sh
cmake -DPLUGIN_TOKUDB=NO -DPLUGIN_OQGRAPH=NO -DPLUGIN_MROONGA=NO -DWITHOUT_MROONGA_STORAGE_ENGINE=YES -DWITHOUT_TOKUDB_STORAGE_ENGINE=YES


Apply "chmod 700
custom/mysql/cmake.mysql" afterwards and run "./build mysql". That's it :)
 
It did not work when I tried to update to 10.1.22. I tried to copy ./custom/mysql/cmake.mysql to ./custom/mariadb/cmake.mariadb and did not work either...

It looks like the build script is not using that file at all... Manual building worked.
 
P.S. I am with:

Code:
root@srv2:/usr/local/directadmin/custombuild # ./build version
2.0.0 (rev: 1657)
 
We have the same issue with this - we need to re-configure mariadb to include --with-max-indexes=256

We created the file /usr/local/directadmin/custombuild/custom/mysql/cmake.mysql and in it:

#!/bin/sh
cmake -DWITH_MAX_INDEXES=256

also tried

#!/bin/sh
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DWITH_INNOBASE_STORAGE_ENGINE=1 \
-DWITH_FEDERATED_STORAGE_ENGINE=1 \
-DWITH_MAX_INDEXES=256 \
-DWITH_ZLIB=bundled -DWITH_EXTRA_CHARSETS=all

Then ./build mysql but mysql just doesnt compile with the option we want.

Any ideas?
 
Hi,

I found there might be a bug in build script resulting that this if will never be true, because of relative path to cmake.mysql:
Code:
if [ -e custom/mysql/cmake.mysql ]; then
                        ${WORKDIR}/custom/mysql/cmake.mysql
                else

After changing this if into the following:
Code:
if [ -e ${WORKDIR}/custom/mysql/cmake.mysql ]; then
                        ${WORKDIR}/custom/mysql/cmake.mysql
                else

The script actually used custom/mysql/cmake.mysql file.

For MAX_INDEXES you should use -DMAX_INDEXES and not -DWITH_MAX_INDEXES and also the highest value for this option in MariaDB seems to be 128:

Code:
#!/bin/sh
cmake -DMAX_INDEXES=128

BR,
Sustah
 
Back
Top