当前位置:网站首页>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!
- Maxpool2d explanation -- Application in arrays and images
- Asynchronous transition scenario - generator
- Arthas debugging problem determination Toolkit
- NATs cluster deployment
- What value should testers play in requirements review? Two minutes will stop you from being stupid
- Explain kubernetes backup and recovery tools velero | learn more about carina series phase III
- Summer Challenge [FFH] harmonyos mobile phone remote control Dayu development board camera
- [designmode] singleton pattern
- How to distinguish between platform security and online hype? What are the stop loss techniques for online speculation?
猜你喜欢

The college entrance examination in 2022 is over. Does anyone really think programmers don't need to study after work?

HP notebook disable touchpad after mouse is inserted

Maxpool2d explanation -- Application in arrays and images

Development of wireless U-shaped ultrasonic electric toothbrush

6-1 exploit -ftp exploit

How does the VR cloud exhibition hall bring vitality to offline entities? What are the functions?

Makefile notes (Yiwen Institute makefile)

Random ball size, random motion collision

BeanUtils. Copyproperties() vs. mapstruct

shell 同时执行多任务下载视频
随机推荐
The full technology stack, full scene and full role cloud native series training was launched to help enterprises build a hard core cloud native technology team
Is it safe to buy funds on the compass?
Pycharm is very fast to learn from installation to full armament. There are so many pictures because it is too detailed!
A detailed explanation of the implementation principle of go Distributed Link Tracking
How to use dataant to monitor Apache APIs IX
异步过渡方案—Generator
The college entrance examination in 2022 is over. Does anyone really think programmers don't need to study after work?
1175. Disposition des nombres premiers / échange de doigts II 104. Nombre de permutations
Cesiumjs 2022 ^ source code interpretation [6] - new architecture of modelempirical
How to open a stock account? Is it safe to open a mobile account
ABAQUS 2022 software installation package and installation tutorial
Solutions to errors in installing OpenSSL for CentOS 6.3 x64 PHP 5.2.6 extensions
Prospects of world digitalization and machine intelligence in the next decade
Which is better, server rental or hosting services in the United States?
女朋友说:你要搞懂了MySQL三大日志,我就让你嘿嘿嘿!
Zero sample and small sample learning
206页上海BIM技术应用与发展报告2021
Query points in MATLAB Delaunay triangulation
In 2022, the latest JCR officially released the list of the latest global impact factors (top 600)
DNS server setup, forwarding, master-slave configuration