当前位置:网站首页>CentOS install MySQL
CentOS install MySQL
2022-07-01 00:05:00 【Shuaiyu yeah~】
Mysql Official website download address
Select universal 
Selected historical version 
Upload to centos In and .tar.xz Format file is converted to .tar File format
xz -d mysql-8.0.27-linux-glibc2.12-x86_64.tar
Unzip it to the corresponding folder
tar -xvf mysql-8.0.27-linux-glibc2.12-x86_64.tar -C /usr/local/shuai
Modify file name
mv mysql-8.0.27-linux-glibc2.12-x86_64/ mysql-8.0.27
Modify the configuration file
cd /
vi /etc/my.cnf
[client]
port=3306
socket=/var/lib/mysql/mysql.sock
[mysqld]
port=3306
user=mysql
socket=/var/lib/mysql/mysql.sock
basedir=/usr/local/shuai/mysql-8.0.27
datadir=/usr/local/shuai/mysql-8.0.27/data
add to mysql Groups and users
groupadd mysql
useradd -g mysql mysql
initialization Mysql Generate initial password
cd /
/usr/local/shuai/mysql-8.0.27/bin/mysqld --initialize --user=mysql --basedir=/usr/local/shuai/mysql-8.0.27/ --datadir=/usr/local/shuai/mysql-8.0.27/data/
Record the initial password 
establish sock The folder is linked to the command
mkdir -p /var/lib/mysql ; chown -R mysql:mysql /var/lib/mysql
ln -s /usr/local/shuai/mysql-8.0.27/bin/mysql /usr/bin
Start the service
/usr/local/shuai/mysql-8.0.27/support-files/mysql.server start
Change the initial password
mysql -uroot -p
Report errors : Enter the following command 
sudo ln -s /usr/lib64/libtinfo.so.6.1 /usr/lib64/libtinfo.so.5
Change the initial password again
mysql -uroot -p
Enter the initial password , Input does not display , Directly enter 
ALTER USER 'root'@'localhost' IDENTIFIED BY 'root';
Turn on remote
use mysql;
update user set host='%' where user='root';
flush privileges;
exit;

Set boot up
cp /usr/local/shuai/mysql-8.0.27/support-files/mysql.server /etc/init.d/mysql
chkconfig mysql on
chkconfig --add mysql
Tencent cloud firewall needs to add rules 
边栏推荐
- Pycharm is very fast to learn from installation to full armament. There are so many pictures because it is too detailed!
- [designmode] factory pattern
- To tell you the truth, ThreadLocal is really not an advanced thing
- conv2d详解--在数组和图像中的使用
- Software supply chain security risk pointing North for enterprise digitalization and it executives
- NATs cluster deployment
- How to mention hot fix and cherry pick
- Don't worry about whether you can be a coder if you don't learn English well. Learn it first
- Design e-commerce seckill system
- C /platform:anycpu32bitpererrored can only be used with /t:exe, /t:winexe and /t:appcontainerexe
猜你喜欢

In depth understanding of jetpack compose kernel: slottable system

The girlfriend said: if you want to understand the three MySQL logs, I will let you heiheihei!

Random ball size, random motion collision

ABAQUS 2022 latest edition - perfect realistic simulation solution

Ditto set global paste only text shortcuts

Why should VR panoramic shooting join us? Leverage resources to achieve win-win results

Fh6908a negative pole turn off synchronous rectification analog low voltage drop diode control IC chip tsot23-6 ultra low power rectifier 1W power consumption < 100ua static replacement mp6908

VR panorama adds contrast function to make the display of differentiation effect more intuitive!

Detailed explanation of conv2d -- use in arrays and images

Ms17-010 Eternal Blue vulnerability of MSF
随机推荐
BeanUtils. Copyproperties() vs. mapstruct
Five minutes to understand the exploratory test
Reason why wechat payment wxpaypubhelper V3 callback XML is empty
New trends of China's national tide development in 2022
Rust book materials - yazhijia Library
Sm2246en+ SanDisk 15131
基金客户服务
Understand target detection in one article: r-cnn, fast r-cnn, fast r-cnn, Yolo, SSD "suggestions collection"
[designmode] singleton pattern
深入理解 Jetpack Compose 内核:SlotTable 系统
Inventory the six second level capabilities of Huawei cloud gaussdb (for redis)
CesiumJS 2022^ 源码解读[6] - 三维模型(ModelExperimental)新架构
Development of wireless U-shaped ultrasonic electric toothbrush
Ctfshow permission maintenance
Why should VR panoramic shooting join us? Leverage resources to achieve win-win results
76页智慧物流园区综合解决方案2022(附下载)
[PHP] self developed framework qphp, used by qphp framework
Ctfshow framework reproduction
Error when starting PHP: [pool www] cannot get uid for user '@php_ fpm_ [email protected]’
The college entrance examination in 2022 is over. Does anyone really think programmers don't need to study after work?