Difference between revisions of "MySQL"
From CBLFS
Jump to navigationJump to searchm (almost 5.1! 5.1.3x needs some additional checks (buggy --without-readline for ex.)) |
|||
Line 15: | Line 15: | ||
* [[TCP Wrappers]] | * [[TCP Wrappers]] | ||
− | {{Note|--with-berkely-db will instruct the build system to use the internal version of [[Berkeley DB]] (Version 4.1.24). This is highly recommended as building against the an external installation rarely compiles cleanly.}} | + | {{Note|--with-berkely-db will instruct the build system to use the internal version of [[Berkeley DB]] (Version 4.1.24). This is highly recommended as building against the an external installation rarely compiles cleanly. Berkeley DB support is deprecated and will be removed in future versions.}} |
== MySQL User/Group == | == MySQL User/Group == | ||
Line 26: | Line 26: | ||
Compile the package: | Compile the package: | ||
− | C_EXTRA_FLAGS=-fno-strict-aliasing \ | + | C_EXTRA_FLAGS="-fno-exceptions -fno-rtti -fno-strict-aliasing -fno-implicit-templates" \ |
./configure --prefix=/usr \ | ./configure --prefix=/usr \ | ||
--sysconfdir=/etc \ | --sysconfdir=/etc \ | ||
Line 34: | Line 34: | ||
--enable-assembler \ | --enable-assembler \ | ||
--enable-local-infile \ | --enable-local-infile \ | ||
− | |||
--without-debug \ | --without-debug \ | ||
--without-bench \ | --without-bench \ | ||
--without-readline \ | --without-readline \ | ||
--with-extra-charsets=all \ | --with-extra-charsets=all \ | ||
− | --with-embedded-server && | + | --with-mysqld-user=mysql \ |
+ | --with-server \ | ||
+ | --with-innodb \ | ||
+ | --with-unix-socket-path=/var/run/mysql/mysql.sock \ | ||
+ | --with-embedded-server \ | ||
+ | --with-embedded-privilege-control && | ||
make testdir=/tmp/mysql | make testdir=/tmp/mysql | ||
Line 57: | Line 61: | ||
CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" \ | CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" \ | ||
− | LDFLAGS="-L/usr/lib" C_EXTRA_FLAGS=-fno-strict-aliasing \ | + | LDFLAGS="-L/usr/lib" \ |
+ | C_EXTRA_FLAGS="-fno-exceptions -fno-rtti -fno-strict-aliasing -fno-implicit-templates" \ | ||
./configure --prefix=/usr \ | ./configure --prefix=/usr \ | ||
--sysconfdir=/etc \ | --sysconfdir=/etc \ | ||
Line 65: | Line 70: | ||
--enable-assembler \ | --enable-assembler \ | ||
--enable-local-infile \ | --enable-local-infile \ | ||
− | |||
--without-debug \ | --without-debug \ | ||
--without-bench \ | --without-bench \ | ||
--without-readline \ | --without-readline \ | ||
--with-extra-charsets=all \ | --with-extra-charsets=all \ | ||
− | --with-embedded-server && | + | --with-mysqld-user=mysql \ |
+ | --with-server \ | ||
+ | --with-innodb \ | ||
+ | --with-unix-socket-path=/var/run/mysql/mysql.sock \ | ||
+ | --with-embedded-server \ | ||
+ | --with-embedded-privilege-control && | ||
make testdir=/tmp/mysql | make testdir=/tmp/mysql | ||
Line 86: | Line 95: | ||
CC="gcc ${BUILDN32}" CXX="g++ ${BUILDN32}" \ | CC="gcc ${BUILDN32}" CXX="g++ ${BUILDN32}" \ | ||
− | C_EXTRA_FLAGS=-fno-strict-aliasing \ | + | C_EXTRA_FLAGS="-fno-exceptions -fno-rtti -fno-strict-aliasing -fno-implicit-templates" \ |
./configure --prefix=/usr --libdir=/usr/lib32 \ | ./configure --prefix=/usr --libdir=/usr/lib32 \ | ||
--sysconfdir=/etc \ | --sysconfdir=/etc \ | ||
Line 94: | Line 103: | ||
--enable-assembler \ | --enable-assembler \ | ||
--enable-local-infile \ | --enable-local-infile \ | ||
− | |||
--without-debug \ | --without-debug \ | ||
--without-bench \ | --without-bench \ | ||
--without-readline \ | --without-readline \ | ||
--with-extra-charsets=all \ | --with-extra-charsets=all \ | ||
− | --with-embedded-server && | + | --with-mysqld-user=mysql \ |
+ | --with-server \ | ||
+ | --with-innodb \ | ||
+ | --with-unix-socket-path=/var/run/mysql/mysql.sock \ | ||
+ | --with-embedded-server \ | ||
+ | --with-embedded-privilege-control && | ||
make testdir=/tmp/mysql | make testdir=/tmp/mysql | ||
Line 115: | Line 128: | ||
CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" \ | CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" \ | ||
− | C_EXTRA_FLAGS=-fno-strict-aliasing \ | + | C_EXTRA_FLAGS="-fno-exceptions -fno-rtti -fno-strict-aliasing -fno-implicit-templates" \ |
./configure --prefix=/usr --libdir=/usr/lib64 \ | ./configure --prefix=/usr --libdir=/usr/lib64 \ | ||
--sysconfdir=/etc \ | --sysconfdir=/etc \ | ||
Line 123: | Line 136: | ||
--enable-assembler \ | --enable-assembler \ | ||
--enable-local-infile \ | --enable-local-infile \ | ||
− | |||
--without-debug \ | --without-debug \ | ||
--without-bench \ | --without-bench \ | ||
--without-readline \ | --without-readline \ | ||
--with-extra-charsets=all \ | --with-extra-charsets=all \ | ||
− | --with-embedded-server && | + | --with-mysqld-user=mysql \ |
+ | --with-server \ | ||
+ | --with-innodb \ | ||
+ | --with-unix-socket-path=/var/run/mysql/mysql.sock \ | ||
+ | --with-embedded-server \ | ||
+ | --with-embedded-privilege-control && | ||
make testdir=/tmp/mysql | make testdir=/tmp/mysql | ||
Revision as of 06:42, 26 March 2009
Download Source: | http://mysql.mirrors.hoobly.com/Downloads/MySQL-5.0/mysql-5.1.43.tar.gz |
---|
Contents
Introduction to MySQL
MySQL is a widely used and fast SQL database server. It is a client/server implementation that consists of a server daemon and many different client programs and libraries.
Project Homepage: http://www.mysql.com/
Dependencies
Optional
--with-berkely-db will instruct the build system to use the internal version of Berkeley DB (Version 4.1.24). This is highly recommended as building against the an external installation rarely compiles cleanly. Berkeley DB support is deprecated and will be removed in future versions.
MySQL User/Group
groupadd -g 40 mysql && useradd -c "MySQL Server" -d /dev/null -g mysql -s /bin/false -u 40 mysql
Non-Multilib
Compile the package:
C_EXTRA_FLAGS="-fno-exceptions -fno-rtti -fno-strict-aliasing -fno-implicit-templates" \ ./configure --prefix=/usr \ --sysconfdir=/etc \ --libexecdir=/usr/sbin \ --localstatedir=/srv/mysql \ --enable-thread-safe-client \ --enable-assembler \ --enable-local-infile \ --without-debug \ --without-bench \ --without-readline \ --with-extra-charsets=all \ --with-mysqld-user=mysql \ --with-server \ --with-innodb \ --with-unix-socket-path=/var/run/mysql/mysql.sock \ --with-embedded-server \ --with-embedded-privilege-control && make testdir=/tmp/mysql
Install the package
make testdir=/tmp/mysql install && rm -rf /tmp/mysql && cd /usr/lib && ln -v -sf mysql/libmysqlclient{,_r}.so* .
Multilib
32Bit
Compile the package:
CC="gcc ${BUILD32}" CXX="g++ ${BUILD32}" \ LDFLAGS="-L/usr/lib" \ C_EXTRA_FLAGS="-fno-exceptions -fno-rtti -fno-strict-aliasing -fno-implicit-templates" \ ./configure --prefix=/usr \ --sysconfdir=/etc \ --libexecdir=/usr/sbin \ --localstatedir=/srv/mysql \ --enable-thread-safe-client \ --enable-assembler \ --enable-local-infile \ --without-debug \ --without-bench \ --without-readline \ --with-extra-charsets=all \ --with-mysqld-user=mysql \ --with-server \ --with-innodb \ --with-unix-socket-path=/var/run/mysql/mysql.sock \ --with-embedded-server \ --with-embedded-privilege-control && make testdir=/tmp/mysql
Install the package
make testdir=/tmp/mysql install && mv -v /usr/bin/mysql_config{,-32} && rm -rf /tmp/mysql && cd /usr/lib && ln -v -sf mysql/libmysqlclient{,_r}.so* .
N32
Compile the package
CC="gcc ${BUILDN32}" CXX="g++ ${BUILDN32}" \ C_EXTRA_FLAGS="-fno-exceptions -fno-rtti -fno-strict-aliasing -fno-implicit-templates" \ ./configure --prefix=/usr --libdir=/usr/lib32 \ --sysconfdir=/etc \ --libexecdir=/usr/sbin \ --localstatedir=/srv/mysql \ --enable-thread-safe-client \ --enable-assembler \ --enable-local-infile \ --without-debug \ --without-bench \ --without-readline \ --with-extra-charsets=all \ --with-mysqld-user=mysql \ --with-server \ --with-innodb \ --with-unix-socket-path=/var/run/mysql/mysql.sock \ --with-embedded-server \ --with-embedded-privilege-control && make testdir=/tmp/mysql
Install the package
make testdir=/tmp/mysql install && mv -v /usr/bin/mysql_config{,-n32} && rm -rf /tmp/mysql && cd /usr/lib32 && ln -v -sf mysql/libmysqlclient{,_r}.so* .
64Bit
Compile the package
CC="gcc ${BUILD64}" CXX="g++ ${BUILD64}" \ C_EXTRA_FLAGS="-fno-exceptions -fno-rtti -fno-strict-aliasing -fno-implicit-templates" \ ./configure --prefix=/usr --libdir=/usr/lib64 \ --sysconfdir=/etc \ --libexecdir=/usr/sbin \ --localstatedir=/srv/mysql \ --enable-thread-safe-client \ --enable-assembler \ --enable-local-infile \ --without-debug \ --without-bench \ --without-readline \ --with-extra-charsets=all \ --with-mysqld-user=mysql \ --with-server \ --with-innodb \ --with-unix-socket-path=/var/run/mysql/mysql.sock \ --with-embedded-server \ --with-embedded-privilege-control && make testdir=/tmp/mysql
Install the package
make testdir=/tmp/mysql install && mv -v /usr/bin/mysql_config{,-64} && ln -sfv multiarch_wrapper /usr/bin/mysql_config && rm -rf /tmp/mysql && cd /usr/lib64 && ln -v -sf mysql/libmysqlclient{,_r}.so* .
Configuring
install -v -m644 /usr/share/mysql/my-medium.cnf /etc/my.cnf
mysql_install_db --user=mysql && chgrp -v mysql /srv/mysql{,/test,/mysql}
install -v -m755 -o mysql -g mysql -d /var/run/mysql && mysqld_safe --user=mysql 2>&1 >/dev/null &
mysqladmin -u root password '<new-password>'
mysqladmin -p shutdown
BootScript
Install the init script included in the bootscripts package:
make install-mysql
Contents
Installed Directories: | /usr/include/mysql, /usr/share/mysql, /usr/lib/mysql |
---|---|
Installed Programs: | mysqld_safe, mysql_install_db, msql2mysql, mysql_config, mysql_fix_privilege_tables, mysql_fix_extensions, mysql_setpermission, mysql_secure_installation, mysql_zap, mysqlaccess, mysqlbug, mysql_convert_table_format, mysql_find_rows, mysqlhotcopy, mysqldumpslow, mysql_explain_log, mysql_tableinfo, mysql_upgrade_shell, mysqld_multi, replace, comp_err, perror, resolveip, my_print_defaults, resolve_stack_dump, mysql_waitpid, innochecksum, myisamchk, myisamlog, myisampack, myisam_ftdump, mysql_tzinfo_to_sql, mysqld, mysql, mysqladmin, mysqlcheck, mysqlshow, mysqldump, mysqlimport, mysqltest, mysqlbinlog, mysql_upgrade, mysqltestmanagerc, mysqltestmanager-pwgen, mysql_client_test, mysqltest_embedded, mysqltestmanager, mysqlmanager |
Installed Libraries: | libmystrings.a, libmysys.a, libdbug.a, libmyisam.a, libmyisammrg.a, libheap.a, libvio.a, libmysqlclient_r.{a,la,so}, libmysqlclient.{a,la,so}, libmysqld.a |