Guide Install MySQL
I.References
II.Hướng dẫn cài đặt
1. Guide 1: install full step (2)
set sql_mode = NO_ENGINE_SUBSTITUTION;#Guideline MySQL
###Install gmake
tar zxvf cmake-VERSION.tar.gz
cd cmake-VERSION
./bootstrap
gmake
gmake install
###Required:
rpm -ivh ncurses-devel-5.7-3.20090208.el6.x86_64.rpm
###Install mysql
groupadd mysql
useradd -r -g mysql mysql
passwd mysql
tar zxvf mysql-VERSION.tar.gz
cd mysql-VERSION
cmake .
make -j4
make install
cd /usr/local/mysql
chown -R mysql .
chgrp -R mysql .
bin/mysql_install_db --user=mysql
chown -R root .
chown -R mysql:mysql /var/lib/mysql/
bin/mysqld_safe --user=mysql &
bin/mysql_secure_installation
cp support-files/mysql.server /etc/init.d/mysql.server
chkconfig mysql.server on
#Cau hinh /etc/my.cnf (luu y cau hinh server-id, auto_increment_increment, auto_increment_offset
#Restart lai ung dung
#Grant quyen tuong ung
GRANT SELECT, INSERT, DELETE, UPDATE ON <database name>.* TO '<user>'@'<ip>' IDENTIFIED BY 'ke-34#$klZ' WITH GRANT OPTION;
GRANT SELECT, INSERT, DELETE, UPDATE, EVENT, EXECUTE ON <database name>.* TO '<user>'@'<ip>' IDENTIFIED BY 'wurfl-383#$k5Z' WITH GRANT OPTION;
#Cau hinh replication
GRANT REPLICATION SLAVE ON *.* TO 'replication'@'<ip>' IDENTIFIED BY '<password>';
CHANGE MASTER TO MASTER_HOST='<ip>', MASTER_USER='<user>', MASTER_PASSWORD='<user>', MASTER_PORT=3306,MASTER_LOG_FILE='pe-mysql3-bin.000001', MASTER_LOG_POS=120, MASTER_CONNECT_RETRY=10;
CHANGE MASTER TO MASTER_HOST='<ip>', MASTER_USER='<user>', MASTER_PASSWORD='slave', MASTER_PORT=3306,MASTER_LOG_FILE='pe-mysql5-bin.000001', MASTER_LOG_POS=120, MASTER_CONNECT_RETRY=10;
CHANGE MASTER TO MASTER_HOST='<ip>', MASTER_USER='<user>', MASTER_PASSWORD='slave', MASTER_PORT=3306,MASTER_LOG_FILE='pe-mysql6-bin.000001', MASTER_LOG_POS=120, MASTER_CONNECT_RETRY=10;
2. Guide 2: install using Generic binaries(2)
download mysql-5.7.10-linux-glibc2.5-x86_64.tartar -xvf mysql-5.7.10-linux-glibc2.5-x86_64.tar
tar -xzvf mysql-5.7.10-linux-glibc2.5-x86_64.tar.gz
mv mysql-5.7.10-linux-glibc2.5-x86_64 /u01/app/vas_dealer/run/mysql-5.7.10
cd /u01/app/vas_dealer/run/mysql-5.7.10
#Copy file my.cnf cu vao thu muc mysql-5.7.10
bin/mysqld --defaults-file=/u01/app/vas_dealer/run/mysql-5.7.10/my.cnf --initialize
bin/mysqld_safe --defaults-file=/u01/app/vas_dealer/run/mysql-5.7.10/my.cnf
set password = password('newpass');
bin/mysql_secure_installation -u root -p
bin/mysql_upgrade --defaults-file=/u01/app/vas_dealer/run/mysql-5.7.10/my.cnf -u root -p
3.Guide 3: install Mysql from source (3)
1. install M4
2,install libiconv
3.instal Ncurses
4. install Bison
5. install cmake
6. install libaio
yum install libaio
7. Install Mysql
Không có nhận xét nào:
Đăng nhận xét