Total Pageviews

Thursday 26 November 2020

利用MySQL-5.7的绿色包安装MySQL

 https://mirrors.sohu.com/mysql/MySQL-5.7/

https://mirrors.sohu.com/mysql/MySQL-5.7/mysql-5.7.26-linux-glibc2.12-x86_64.tar.gz

注意:mysql-5.7.26-linux-glibc2.12-x86_64.tar.gz不是源码包,不需要编译,解压即可使用:

wget https://mirrors.sohu.com/mysql/MySQL-5.7/mysql-5.7.26-linux-glibc2.12-x86_64.tar.gz

tar xvf mysql-5.7.26-linux-glibc2.12-x86_64.tar.gz

cd mysql-5.7.26-linux-glibc2.12-x86_64

root@p1601860745:~/mysql-5.7.26-linux-glibc2.12-x86_64# ls

bin  COPYING  data  docs  include  lib man  README  share  support-files

root@p1601860745:~/mysql-5.7.26-linux-glibc2.12-x86_64# cd bin

root@p1601860745:~/mysql-5.7.26-linux-glibc2.12-x86_64/bin# ls

innochecksum   mysqladmin       mysqld_multi mysqlpump     mysqlxtest

lz4_decompress   mysqlbinlog       mysqld_safe mysql_secure_installation  perror

myisamchk   mysqlcheck       mysqldump mysqlshow     replace

myisam_ftdump   mysql_client_test_embedded  mysqldumpslow mysqlslap     resolveip

myisamlog   mysql_config       mysql_embedded mysql_ssl_rsa_setup     resolve_stack_dump

myisampack   mysql_config_editor       mysqlimport mysqltest_embedded     zlib_decompress

my_print_defaults  mysqld       mysql_install_db  mysql_tzinfo_to_sql

mysql   mysqld-debug       mysql_plugin mysql_upgrade

root@p1601860745:~/mysql-5.7.26-linux-glibc2.12-x86_64/bin# echo 'export PATH=$PATH:/root/mysql-5.7.26-linux-glibc2.12-x86_64/bin' >> /etc/profile

root@p1601860745:~/mysql-5.7.26-linux-glibc2.12-x86_64/bin# . /etc/profile

root@p1601860745:~/mysql-5.7.26-linux-glibc2.12-x86_64/bin# groupadd mysql

root@p1601860745:~/mysql-5.7.26-linux-glibc2.12-x86_64/bin# useradd -r -g mysql -s /bin/false mysql

root@p1601860745:~/mysql-5.7.26-linux-glibc2.12-x86_64/bin# mkdir -p ~/mysql-5.7.26-linux-glibc2.12-x86_64/data

root@p1601860745:~/mysql-5.7.26-linux-glibc2.12-x86_64/bin# chown -R mysql:mysql ~/mysql-5.7.26-linux-glibc2.12-x86_64/

root@p1601860745:~/mysql-5.7.26-linux-glibc2.12-x86_64/bin# cd ../support-files

root@p1601860745:~/mysql-5.7.26-linux-glibc2.12-x86_64/support-files# nano my_default.cnf

root@p1601860745:~/mysql-5.7.26-linux-glibc2.12-x86_64/support-files# cat my_default.cnf

[mysqld]

sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES 

 

basedir = /root/mysql-5.7.26-linux-glibc2.12-x86_64/

datadir = /root/mysql-5.7.26-linux-glibc2.12-x86_64/data

port = 3306

socket = /tmp/mysql.sock

character-set-server=utf8

 

log-error = /root/mysql-5.7.26-linux-glibc2.12-x86_64/data/mysqld.log

pid-file = /root/mysql-5.7.26-linux-glibc2.12-x86_64/data/mysqld.pid

root@p1601860745:~/mysql-5.7.26-linux-glibc2.12-x86_64/support-files# cp my_default.cnf /etc/my.cnf

root@p1601860745:~/mysql-5.7.26-linux-glibc2.12-x86_64/support-files# mysqld --initialize --user=mysql --basedir=/root/mysql-5.7.26-linux-glibc2.12-x86_64/ --datadir=/root/mysql-5.7.26-linux-glibc2.12-x86_64/data/

root@p1601860745:~/mysql-5.7.26-linux-glibc2.12-x86_64/support-files# apt-get install -y libnuma1 libnuma-dev

root@p1601860745:~/mysql-5.7.26-linux-glibc2.12-x86_64/support-files# mysqld --initialize --user=mysql --basedir=/root/mysql-5.7.26-linux-glibc2.12-x86_64/ --datadir=/root/mysql-5.7.26-linux-glibc2.12-x86_64/data/


相关帖子:https://briteming.blogspot.com/2011/11/mysql-5.html



No comments:

Post a Comment