当前位置:网站首页>Install database -linux-5.7
Install database -linux-5.7
2022-07-03 09:23:00 【Great you don't know】
1、 download tar package , Use here wget Download from official website
wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.22-linux-glibc2.12-x86_64.tar.gz
2、 take mysql The installation to /usr/local/mysql Next
decompression
tar -xvf mysql-5.7.22-linux-glibc2.12-x86_64.tar.gz
Move
mv mysql-5.7.22-linux-glibc2.12-x86_64 /usr/local/
rename
mv /usr/local/mysql-5.7.22-linux-glibc2.12-x86_64 /usr/local/mysql
3、 newly build data Catalog
mkdir /usr/local/mysql/data
4、 newly build mysql user 、mysql User group
mysql User group
groupadd mysql
mysql user
useradd mysql -g mysql
5、 take /usr/local/mysql The owner and group of are changed to mysql
chown -R mysql.mysql /usr/local/mysql
6、 To configure
/usr/local/mysql/bin/mysql_install_db --user=mysql --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data
If the following error occurs :
Copy code
2018-07-14 06:40:32 [WARNING] mysql_install_db is deprecated. Please consider switching to mysqld --initialize
2018-07-14 06:40:32 [ERROR] Child process: /usr/local/mysql/bin/mysqldterminated prematurely with errno= 32
2018-07-14 06:40:32 [ERROR] Failed to execute /usr/local/mysql/bin/mysqld --bootstrap --datadir=/usr/local/mysql/data --lc-messages-dir=/usr/local/mysql/share --lc-messages=en_US --basedir=/usr/local/mysql
– server log begin –
– server log end –
Copy code
Then use the following command :
/usr/local/mysql/bin/mysqld --user=mysql --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data --initialize
If the following error occurs :
/usr/local/mysql/bin/mysqld: error while loading shared libraries: libnuma.so.1: cannot open shared object file: No such file or directory
Then execute the following command :
yum -y install numactl
Continue installation after completion :
/usr/local/mysql/bin/mysqld --user=mysql --basedir=/usr/local/mysql/ --datadir=/usr/local/mysql/data --initialize
edit /etc/my.cnf
Copy code
[mysqld]
datadir=/usr/local/mysql/data
basedir=/usr/local/mysql
socket=/tmp/mysql.sock
user=mysql
port=3306
character-set-server=utf8
Cancel password verification
skip-grant-tables
Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
skip-grant-tables
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
Copy code
7、 Opening service
take mysql Join the service
cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql
Boot from boot
chkconfig mysql on
Turn on
service mysql start
8、 Set the password
Sign in ( because /etc/my.cnf Canceling password authentication is set in , So the password here is arbitrary )
/usr/local/mysql/bin/mysql -u root -p
operation mysql database
use mysql;
Change Password
update user set authentication_string=password(‘ Your password ’) where user=‘root’;
flush privileges;
exit;
9、 take /etc/my.cnf Medium skip-grant-tables Delete
10、 Log in and set the password again ( I don't know why I can't operate the database without setting the password again )
/usr/local/mysql/bin/mysql -u root -p
ALTER USER ‘root’@‘localhost’ IDENTIFIED BY ‘ Modified password ’;
exit;
11、 Allow remote connections
/usr/local/mysql/bin/mysql -u root -p
use mysql;
update user set host=’%’ where user = ‘root’;
flush privileges;
eixt;
12、 Add shortcut
ln -s /usr/local/mysql/bin/mysql /usr/bin
边栏推荐
- Derivation of Fourier transform
- [set theory] order relation (chain | anti chain | chain and anti chain example | chain and anti chain theorem | chain and anti chain inference | good order relation)
- Go language - Reflection
- Utilisation de hudi dans idea
- Matlab dichotomy to find the optimal solution
- 【点云处理之论文狂读经典版10】—— PointCNN: Convolution On X-Transformed Points
- [point cloud processing paper crazy reading cutting-edge version 12] - adaptive graph revolution for point cloud analysis
- 【Kotlin学习】高阶函数的控制流——lambda的返回语句和匿名函数
- [point cloud processing paper crazy reading frontier version 11] - unsupervised point cloud pre training via occlusion completion
- [point cloud processing paper crazy reading frontier version 8] - pointview gcn: 3D shape classification with multi view point clouds
猜你喜欢

【Kotlin学习】类、对象和接口——带非默认构造方法或属性的类、数据类和类委托、object关键字

Discussion on enterprise informatization construction

IDEA 中使用 Hudi
![[point cloud processing paper crazy reading classic version 12] - foldingnet: point cloud auto encoder via deep grid deformation](/img/62/edb888200e3743b03e5b39d94758f8.png)
[point cloud processing paper crazy reading classic version 12] - foldingnet: point cloud auto encoder via deep grid deformation

推荐一个 yyds 的低代码开源项目

常见渗透测试靶场

On February 14, 2022, learn the imitation Niuke project - develop the registration function

Jenkins learning (III) -- setting scheduled tasks

Construction of simple database learning environment

LeetCode 1089. Duplicate zero
随机推荐
Liteide is easy to use
Go language - JSON processing
教育信息化步入2.0,看看JNPF如何帮助教师减负,提高效率?
Common penetration test range
Education informatization has stepped into 2.0. How can jnpf help teachers reduce their burden and improve efficiency?
Hudi学习笔记(三) 核心概念剖析
Go language - Reflection
Move anaconda, pycharm and jupyter notebook to mobile hard disk
npm install安装依赖包报错解决方法
[point cloud processing paper crazy reading frontier version 10] - mvtn: multi view transformation network for 3D shape recognition
Utilisation de hudi dans idea
[graduation season | advanced technology Er] another graduation season, I change my career as soon as I graduate, from animal science to programmer. Programmers have something to say in 10 years
2022-1-6 Niuke net brush sword finger offer
There is no open in default browser option in the right click of the vscade editor
[point cloud processing paper crazy reading classic version 11] - mining point cloud local structures by kernel correlation and graph pooling
Crawler career from scratch (IV): climb the bullet curtain of station B through API
【点云处理之论文狂读经典版10】—— PointCNN: Convolution On X-Transformed Points
Go language - IO project
Tag paste operator (#)
【点云处理之论文狂读经典版9】—— Pointwise Convolutional Neural Networks