mysql5.6.35-glibc installation

mysql5.6.35-glibc installation

Official website download: mysql official website
Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here

Insert picture description here
Create user mysql

 useradd mysql -r -s   /bin/false 

Unzip the installation package

tar -zxvf mysql-5.6.35-linux-glibc2.5-x86_64.tar.gz 

Modify the mysql file name

 mv mysql-5.6.35-linux-glibc2.5-x86_64 mysql

Change mysql file permissions

 chown -R mysql.mysql /usr/local/mysql

Confirm that there is no my.cnf file in the system

rm -rf /etc/my.cnf

Initialize mysql

//mysql目录下执行
scripts/mysql_install_db   --user=mysql

If there is an error
FATAL ERROR: please install the following Perl modules before executing scripts/mysql_install_db: Data::Dumper
Solution: install the autoconf library

yum -y install autoconf

Copy the script to /etc/init.d and start

 cp support-files/mysql.server /etc/init.d/mysql5.6.35
 service mysql5.6.35 start

Insert picture description here
Set the root password according to the above log prompt

 ./bin/mysqladmin -u root password 'new-password'
 ./bin/mysqladmin -u root -h izbp15qjp71zgmecy3ddzfz password 'new-password'
 ./bin/mysql_secure_installation 

Add mysql environment variable

 vim /etc/profile

Insert picture description here

source /etc/profile

Log in to the client

 mysql -u root -p

Guess you like

Origin blog.csdn.net/weixin_45742032/article/details/114671595
Recommended