User Tools

Site Tools


building_mariadb_on_freebsd

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
building_mariadb_on_freebsd [2017/07/02 02:02]
k2patel created
building_mariadb_on_freebsd [2017/07/02 02:10]
k2patel
Line 1: Line 1:
-Build / Compile MariaDB on FreeBSD +====== ​Build / Compile MariaDB on FreeBSD ​======
-Getting Source+
  
-get source from MariaDB+==== Getting Source ==== 
 + 
 + 
 +get source from [[http://​www.mariadb.org/​|MariaDB]]\\
 extract to /​usr/​local/​src/​mariadb extract to /​usr/​local/​src/​mariadb
  
-Configure+==== Configure ​====
  
-Modular configure (usually you need to load plugins with my.cnf) i am using this one. 
  
 +**Modular configure** (usually you need to load plugins with my.cnf) i am using this one.
 +
 +<code bash>
 ./configure --with-extra-charsets=all --localstatedir=/​var/​db/​mysql ./configure --with-extra-charsets=all --localstatedir=/​var/​db/​mysql
 +</​code>​
 OR OR
  
-Build With Plugin +**Build With Plugin** 
 +<code bash>
 ./configure --with-extra-charsets=all ​ --with-plugin-maria --with-plugin-xtradb --localstatedir=/​var/​db/​mysql ./configure --with-extra-charsets=all ​ --with-plugin-maria --with-plugin-xtradb --localstatedir=/​var/​db/​mysql
-OR+</​code>​
  
-Static Build as suggested by MariaDB wiki.+OR
  
 +**Static Build** as suggested by MariaDB wiki.
 +<code bash>
 ./configure --prefix=/​usr/​local/​mysql --enable-assembler \ ./configure --prefix=/​usr/​local/​mysql --enable-assembler \
 --with-extra-charsets=all ​ --enable-thread-safe-client ​ --with-big-tables \ --with-extra-charsets=all ​ --enable-thread-safe-client ​ --with-big-tables \
Line 26: Line 33:
 --with-mysqld-ldflags=-all-static ​ --with-client-ldflags=-all-static \ --with-mysqld-ldflags=-all-static ​ --with-client-ldflags=-all-static \
 --with-zlib-dir=bundled --enable-local-infile --with-zlib-dir=bundled --enable-local-infile
 +</​code>​
 Now run “make -j4” and “make install” – will install it on system. Now run “make -j4” and “make install” – will install it on system.
  
-rc script+==== rc script ​==== 
  
 You can simply use script provided with port version of mysql. You can simply use script provided with port version of mysql.
 Just in case if you dont have it, use below. Just in case if you dont have it, use below.
  
-/​usr/​local/​etc/​rc.d/​mysql+<code bash /​usr/​local/​etc/​rc.d/​mysql>
 #!/bin/sh #!/bin/sh
 # #
Line 108: Line 117:
    
 run_rc_command "​$1"​ run_rc_command "​$1"​
-Enable and Start+</​code>​ 
 + 
 +**Enable and Start**
  
 Final steps…. (remember i am using Modular configure) Final steps…. (remember i am using Modular configure)
-/etc/my.cnf+<code bash /etc/my.cnf>
 [mysqld] [mysqld]
 ## ##
Line 175: Line 186:
 #​master-connect-retry=60 #​master-connect-retry=60
 #​replicate-ignore-db=mysql,​test #​replicate-ignore-db=mysql,​test
 +
 +</​code>​
 +
 Enabled it in rc.conf Enabled it in rc.conf
  
 +<code bash>
 echo '​mysql_enable="​YES"'​ >> /​etc/​rc.conf echo '​mysql_enable="​YES"'​ >> /​etc/​rc.conf
 +</​code>​
 +
 Now start it using. Now start it using.
  
 +<code bash>
 /​usr/​local/​etc/​rc.d/​mysql-server start /​usr/​local/​etc/​rc.d/​mysql-server start
-Error+</​code>​ 
 + 
 +**Error**
  
 If you get any error related to DB not found (usually get created on first RUN). If you get any error related to DB not found (usually get created on first RUN).
  
 +<code bash>
 mysql_install_db --datadir=/​usr/​local/​var mysql_install_db --datadir=/​usr/​local/​var
-ENJOY!! Optimized Version of MySQL MariaDB+</​code>​ 
 + 
 +**ENJOY!! Optimized Version of MySQL MariaDB**
building_mariadb_on_freebsd.txt · Last modified: 2017/07/02 02:10 by k2patel