linuxインストールmysql:ubuntu 16.04+mysql5.7/mysql8.0
2412 ワード
カスタムインストールmysqlライブラリ
mysql cmake指定パラメータ:https://dev.mysql.com/doc/refman/8.0/en/source-configuration-options.html
install guide:https://dev.mysql.com/doc/refman/8.0/en/installing-source-distribution.html
https://dev.mysql.com/doc/mysql-sourcebuild-excerpt/5.5/en/installing-source-distribution.htmlhttps://www.jianshu.com/p/117dab1b658d
percona mysql version build:https://www.percona.com/doc/percona-server/LATEST/installation.html#compile-from-source
redhat bison install:
https://geeksww.com/tutorials/miscellaneous/bison_gnu_parser_generator/installation/installing_bison_gnu_parser_generator_ubuntu_linux.php
flex001@flex001-desktop:~/Desktop$ cat mysql_install.txt
Install boost
# https://sourceforge.net/projects/boost/files/boost/1.59.0/
wget https://sourceforge.net/projects/boost/files/boost/1.67.0/boost_1_67_0.tar.gz
wget https://sourceforge.net/projects/boost/files/boost/1.59.0/boost_1_59_0.tar.gz
tar -zxvf boost_1_59_0.tar.gz
tar -zxvf boost_1_67_0.tar.gz
# https://www.boost.org/doc/libs/1_61_0/more/getting_started/unix-variants.html
sudo apt-get install libncurses5-dev libncursesw5-dev
sudo apt-get install libreadline6 libreadline6-dev
sudo apt-get install zlib1g-dev
sudo apt-get install curl libcurl3 libcurl3-dev
sudo apt-get install bison
:~/percona-mysql/percona-server/storage/tokudb/PerconaFT/third_party$ git clone https://github.com/jemalloc/jemalloc.git
sudo apt install autoconf
git clone https://github.com/mysql/mysql-server.git
for 5.7:
cmake . -DCMAKE_INSTALL_PREFIX=/home/cq/library/mysql-5.7 -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/home/cq/library/boost_1_59_0
for 8.0:
cmake . -DCMAKE_INSTALL_PREFIX=/home/cq/library/mysql-8.0 -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/home/cq/library/boost_1_67_0
make -j8
make install
sudo groupadd mysql
sudo useradd -r -g mysql -s /bin/false mysql
cd /home/cq/library/mysql-8.0
sudo chown -R mysql .
sudo chgrp -R mysql .
sudo bin/mysqld --initialize --user=mysql
record passward
sudo bin/mysql_ssl_rsa_setup
sudo bin/mysqld_safe --user=mysql [--disable-log-bin] //use test, then you just mysql.server start
sudo support-files/mysql.server start
sudo bin/mysql -u root -p
alter user 'root'@'localhost' identified by '123';
sudo support-files/mysql.server stop
export PATH=$PATH:/home/flex001/local/bin
then you can use mysql -u root -p
mysql cmake指定パラメータ:https://dev.mysql.com/doc/refman/8.0/en/source-configuration-options.html
install guide:https://dev.mysql.com/doc/refman/8.0/en/installing-source-distribution.html
https://dev.mysql.com/doc/mysql-sourcebuild-excerpt/5.5/en/installing-source-distribution.htmlhttps://www.jianshu.com/p/117dab1b658d
percona mysql version build:https://www.percona.com/doc/percona-server/LATEST/installation.html#compile-from-source
redhat bison install:
https://geeksww.com/tutorials/miscellaneous/bison_gnu_parser_generator/installation/installing_bison_gnu_parser_generator_ubuntu_linux.php