中科院映象站安裝:
mysql-community-common-5.7.26-1.el7.x86_64.rpm
mysql-community-libs-5.7.26-1.el7.x86_64.rpm
mysql-community-client-5.7.26-1.el7.x86_64.rpm
mysql-community-devel-5.7.26-1.el7.x86_64.rpm
mysql-community-server-5.7.26-1.el7.x86_64.rpm
#官網安裝:
wget
#安裝mysql:
#安裝源
sudo rpm -uvh mysql80-community-release-el7-3.noarch.rpm
#檢視包資訊:
yum repolist all | grep mysql
yum repolist enabled | grep mysql
#設定可用包:
sudo yum-config-manager --disable mysql80-community
sudo yum-config-manager --enable mysql57-community
#安裝sudo yum install mysql-community-server
#啟動sudo systemctl start mysqld.service
#檢視root使用者密碼
grep 'temporary password' /var/log/mysqld.log
#修改密碼:
mysql -uroot -p
alter user 'root'@'localhost' identified by 'mynewpass4!';
編譯安裝
#安裝依賴包
yum -y install gcc gcc-c++ ncurses ncurses-devel cmake
#boost
wget
或wget
#mysql
wget
或wget
#新增mysql使用者
useradd -m -s /sbin/nologin mysql
groupadd mysql
useradd -r -g mysql mysql
tar xzf boost_1_59_0.tar.gz
tar xzf mysql-5.7.9.tar.gz
mkdir -p /data/mysql
cd mysql-5.7.9
#編譯安裝
cmake . -dcmake_install_prefix=/usr/local/mysql \
-dmysql_datadir=/data/mysql \
-ddownload_boost=1 \
-dwith_boost=/root/boost_1_59_0 \
-dsysconfdir=/etc \
-dwith_innobase_storage_engine=1 \
-dwith_partition_storage_engine=1 \
-dwith_federated_storage_engine=1 \
-dwith_blackhole_storage_engine=1 \
-dwith_myisam_storage_engine=1 \
-denabled_local_infile=1 \
-denable_dtrace=0 \
-ddefault_charset=utf8mb4 \
-ddefault_collation=utf8mb4_general_ci \
-dwith_embedded_server=1
make -j `grep processor /proc/cpuinfo | wc -l`
make install
# 啟動指令碼,設定開機自啟動
/bin/cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld
chmod +x /etc/init.d/mysqld
chkconfig --add mysqld
chkconfig mysqld on
安裝mysql步驟 start 安裝mysql步驟
1.yum install lrzsz 安裝上傳功能 2.檢視系統是否裝有mysql rpm qa grep mysql 3.檢視系統mysql位置 whereis mysql 4.解除安裝mysql yum y remove mysql libs.x86 64 5.檢視yum庫上的mysql版本 ...
集群安裝mysql 集群rpm安裝MySQL
安裝mysql資料庫 b 安裝mysql源 yum localinstall mysql57 community release el7 8.noarch.rpm 若結尾出現complete 則說明mysql源安裝完成 c 檢測是否安裝完成 yum repolist enabled grep mys...
mysql編譯安裝gcc 編譯安裝mysql
一 安裝編譯工具及庫檔案 yum y install gcc gcc c make autoconf libtool ltdl devel gd devel freetype devel libxml2 devel libjpeg devel libpng devel openssl devel c...