no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | mysql_source_installation [2015/06/01 22:56] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== MySQL Source Installation ====== | ||
+ | |||
+ | * [[MySQL]] | ||
+ | |||
+ | Generic install for MySQL. | ||
+ | |||
+ | Add mysql group and user: | ||
+ | |||
+ | < | ||
+ | groupadd mysql | ||
+ | useradd -g mysql mysql | ||
+ | </ | ||
+ | |||
+ | Target install base: | ||
+ | |||
+ | < | ||
+ | / | ||
+ | /usr/bin - binaries | ||
+ | /etc/mysql - configuration | ||
+ | /usr/lib/ - libraries | ||
+ | / | ||
+ | /usr/sbin - mysqld binary | ||
+ | / | ||
+ | /usr/share - shares | ||
+ | / | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | Unpack tarball and start build for a 5.5 install: | ||
+ | |||
+ | < | ||
+ | rm -f CMakeCache.txt | ||
+ | cmake . -DCMAKE_INSTALL_PREFIX=/ | ||
+ | make | ||
+ | </ | ||
+ | |||
+ | Install new init script: | ||
+ | |||
+ | < | ||
+ | cp / | ||
+ | cp support-files/ | ||
+ | </ | ||
+ | |||
+ | Get the old value for the '' | ||
+ | |||
+ | < | ||
+ | mysql information_schema -Bse " | ||
+ | </ | ||
+ | |||
+ | Backups, stop server: | ||
+ | |||
+ | < | ||
+ | mysqldump -A > ~/ | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | Setup directories, | ||
+ | |||
+ | < | ||
+ | mkdir / | ||
+ | touch / | ||
+ | rm -f / | ||
+ | mkdir -p / | ||
+ | mkdir -p / | ||
+ | touch / | ||
+ | </ | ||
+ | |||
+ | Actually install binaries, final setup: | ||
+ | |||
+ | < | ||
+ | make install | ||
+ | cd /usr | ||
+ | # ./ | ||
+ | chown -R mysql: / | ||
+ | chmod 2750 / | ||
+ | chmod 0700 / | ||
+ | cp / | ||
+ | </ | ||
+ | |||
+ | Start the server: | ||
+ | |||
+ | < | ||
+ | tail -f / | ||
+ | mv / | ||
+ | chmod +x / | ||
+ | / | ||
+ | </ | ||
+ | |||
+ | Create symlinks that would be deleted before now: | ||
+ | |||
+ | < | ||
+ | ln -s / | ||
+ | ln -s / | ||
+ | ln -s / | ||
+ | </ | ||
+ | |||
+ | Bring databases up to speed: | ||
+ | |||
+ | < | ||
+ | mysql_upgrade | ||
+ | mysqlcheck -A | ||
+ | </ | ||
+ | |||
+ | Some possible loose ends: | ||
+ | |||
+ | < | ||
+ | cpan install DBD::MySQL | ||
+ | </ | ||
+ | |||
+ | Add to your php.ini: | ||
+ | |||
+ | < | ||
+ | pdo_mysql.default_socket = / | ||
+ | </ | ||
+ | |||