当前位置:网站首页>Centos 7.7 mysql8.0.29 binary installation
Centos 7.7 mysql8.0.29 binary installation
2022-08-07 19:52:00 【51CTO】
Environment: centos 7
Preparation: database installation path/data/mysql
[[email protected] my.cnf.d]# mkdir /data/mysql -p Unzip: path /usr/local [[email protected] soft]# wget https://downloads.mysql.com/archives/get/p/23/file/mysql-8.0.29-linux-glibc2.12-x86_64.tar.xz 1. Installation package yum -y install libaio numactl-libs
2, users and groups groupadd mysql useradd -r -g mysql -s /bin/false mysql
3. Prepare program files
[[email protected] soft]# tar xvf mysql-8.0.29-linux-glibc2.12-x86_64.tar.xz -C /usr/local/
cd /usr/local/ ln -s mysql-5.7.29-linux-glibc2.12-x86_64/ mysql chown -R root.root /usr/local/mysql-.../ The last slash should be added, and I have stepped on the pit here
4. Prepare environment variables
[[email protected] bin]# echo 'PATH=/usr/local/mysql/bin:$PATH' > /etc/profile.d/mysql.sh [[email protected]]# . /etc/profile.d/mysql.sh(new window) [[email protected] bin]#
5. Generate configuration file
cp /etc/my.cnf{,.bak}
[[email protected] mysql]# grep -v ^# /etc/my.cnf [mysqld] datadir=/data/mysql socket=/data/mysql/mysql.sock symbolic-links=0 skip_name_resolve=1 [mysqld_safe] log-error=/data/mysql/mysql.log pid-file=/data/mysql/mysql.pid
[client] socket=/data/mysql/mysql.sock
[[email protected] mysql]#
6. Generate the database file and extract the root password (open a new window) [[email protected] ~]# mysqld --initialize --user=mysql --datadir=/data/mysql [[email protected] ~]#
View temporary password: cat /data/mysql/mysql.log ??[[email protected] bin]# mysqld --initialize --user=mysql --datadir=/data/mysql 2022-08-07T08:51:09.249160Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic linksusing --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release. 2022-08-07T08:51:09.249313Z 0 [System] [MY-013169] [Server] /usr/local/mysql-8.0.29-linux-glibc2.12-x86_64/bin/mysqld (mysqld 8.0.29) initializing of server in progress as process 9095 2022-08-07T08:51:09.261881Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2022-08-07T08:51:09.820419Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended. 2022-08-07T08:51:11.256792Z 6 [Note] [MY-010454] [Server] A temporary password is generated for [email protected]: 6GBj57k2qD.v
7. Script to prepare service
[[email protected] ~]# cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysqld
[[email protected] local]# cd /usr/local/mysql/bin
[[email protected] bin]#
[[email protected] ~]# chkconfig --add mysqld [[email protected] ~]#
Start service [[email protected] ~]# systemctl start mysqld
[[email protected] ~]# mysql -uroot -p'6GBj57k2qD.v' You can log in at this time, but you cannot do any operation alter user root identified by '123456';
Change password for versions before 5.7.6 1\SET PASSWORD = PASSWORD('123456');
[[email protected] ~]# mysqladmin -uroot -p'.e2i;He2y!wu' password 112345
now mysql> ALTER USER USER() IDENTIFIED BY 'centos'; Query OK, 0 rows affected (0.01 sec)
mysql>
mysql -uroot -p'Admin123'
From MySQL version 5.6.6, the password_expired function has been added, which allows to set the user's expiration time.This feature has been added to the mysql.user data table, but its default value is "N", which can be changed using the ALTER USER statement.
8\Run secure install command
mysql_secure_installation
Log in locally to create an account
create user [email protected]'%.%.%.%' identified by 'centos';
边栏推荐
- [C# language] DataGridView hides rows and columns
- Math Polynomial Division Synthetic Division
- Translation Assistant - Free Translation Assistant Download
- [chestnut sugar GIS] DOS - how to create subfolders in batches inside the current folder
- Tcache Stashing Unlink Attack 原理详解
- 跨域问题与解决方法
- OpenHarmony像素单位
- JMeter笔记7 | JMeter脚本回放
- 在vscode里打开IntelliSense配置的方法
- Technology Sharing | How to do json response assertion in interface automation test?
猜你喜欢

checkbox 设置默认值

认识UDS诊断29认证服务

Transformer pytorch implements line-by-line detailed explanation

JMeter笔记7 | JMeter脚本回放
![[chestnut sugar GIS] DOS - how to extract the folder name](/img/c9/3e37571faf98fad6012152c9ffc5bd.png)
[chestnut sugar GIS] DOS - how to extract the folder name

Mysql.索引详解

Linear Prediction and Autoregressive Modeling

【板栗糖GIS】DOS—如何提取文件夹名称

PHP will word file to preview picture
【C#语言】DataGridView修改选中行颜色
随机推荐
OpenHarmony pixel unit
[C# language] DataGridView draws row numbers
PHP将word文件转为图片预览
[C# language] DataGridView hides rows and columns
STM32学习笔记:独立看门狗和窗口看门狗
Chaoyang District and 360 Group jointly build a security service platform for SMEs
[Educational Codeforces Round 133 F] Bags with Balls
魔众API支持接口数量配额邮件告警
什么是脑裂
ctfshow七夕杯web
Scala entry to proficient (Shang Silicon Valley study notes)
Database Notes
word translation - batch word translation
The use of QT thread pool
redis详解(内部分享版)
Json format data and QT operation Json data
【板栗糖GIS】DOS—如何删除特定的文件夹
OPENCV学习DAY11
Math Polynomial Division Synthetic Division
cesium 压平的一种实现方式