githubEdit

MySQL

MySQL

Introduction

...

Deploy By Binary

Quick Start

# download source with boost lib
wget https://dev.mysql.com/get/Downloads/MySQL-8.0/mysql-boost-8.0.34.tar.gz
tar xf mysql-boost-8.0.34.tar.gz && rm -f mysql-8.0.34

# compile
mkdir /opt/mysql
mkdir bld && cd bld
cmake .. -DCMAKE_INSTALL_PREFIX=/opt/mysql -DMYSQL_DATADIR=/opt/mysql/data -DWITH_BOOST=/root/mysql-8.0.34/boost/ -DSYSCONFDIR=/opt/mysql/sysconfig
make -j `grep processor /proc/cpuinfo | wc -l`
make install

# postinstallation
groupadd mysql
useradd -r -g mysql -s /bin/false mysql
mkdir /opt/mysql/temp /opt/mysql/logs /opt/mysql/sysconfig && chmod 777 /opt/mysql/temp
chown mysql:mysql /opt/mysql -R
./bin/mysqld --initialize --user=mysql --basedir=/opt/mysql --datadir=/opt/mysql/data

# config and startup
cat > /opt/mysql/sysconfig/my.cnf << "EOF"
...
EOF
./bin/mysqld_safe --user=mysql &

# reset root password
./bin/mysql -uroot -p
ALTER USER 'root'@'localhost' IDENTIFIED BY '123qwe';

Config and Boot

[[sc-mysqld|Mysqld Config]]

Verify

Troubleshooting

Deploy By Container

Run On Kubernetes

Reference:

Last updated