当前位置:网站首页>Installing MySQL database on Linux server (detailed tutorial)
Installing MySQL database on Linux server (detailed tutorial)
2022-07-18 21:39:00 【Programming Xiaobai who loves Java】
I don't say much nonsense , Go straight to the tutorial .
1. First, execute the following command , to update YUM Source .
rpm -Uvh http://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm
2. Execute the following command , install MySQL.
yum -y install mysql-community-server --nogpgcheck
3. Execute the following command , see MySQL Version number .
mysql -V
4. The results are as follows , Indicates that you have successfully installed MySQL.

5. Execute the following command , start-up MySQL service .
systemctl start mysqld
6. Execute the following command , Set up MySQL The service starts automatically .
systemctl enable mysqld
7. To configure MySQL Of root User password .
Execute the following command , see /var/log/mysqld.log file , obtain root User's initial password .
grep 'temporary password' /var/log/mysqld.log
8. The return result is as follows , You can see root User's initial password .

9. Execute the following command , Use root User login database .
mysql -uroot -p
10. The return result is as follows , Input root User's initial password .( The password entered will not be displayed )

11. Execute the following command , modify MySQL Of root User's initial password .
set global validate_password_policy=0; # Change the password security policy to low ( Only verify password length , At least 8 position ). ALTER USER 'root'@'localhost' IDENTIFIED BY '12345678';
12. Execute the following command , grant root User remote management rights .
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '12345678';
Input exit Exit database .

Execute the following command , Use root User login database .
mysql -uroot -p12345678
Come here mysql Installation of is complete , The default installation directory is /var/lib/mysql This directory
You can also use find / -name mysql Use this command to view mysql Installation directory

Refer to Alibaba cloud lab documentation :MySQL Database rapid deployment practice - Yunqi Laboratory - Online experiments - Go to the cloud and practice - Alicloud developer community - Alibaba cloud's official experimental platform - Alibaba cloud
边栏推荐
- Unity - Common APIs (continued time class)
- I rolled up a small and beautiful [markdown static blog program] at home
- [C language brush leetcode] 2155 All subscripts with the highest score in the group (m)
- leetcode:1552. Magnetic force between two balls [maximum value of maximum value = two points]
- Introduction to phabricator conduct API
- What are the directions of voice signal processing in audio and video?
- R language uses pcauchy function to generate Cauchy distribution cumulative distribution function data, and uses plot function to visualize Cauchy distribution cumulative distribution function data
- [cache] introduction of a new cache caffeine cache
- How to describe variables: storage class, life cycle, scope, link attribute
- Best practices for the use of exclusive resource pools - Introduction to the use of dependent services
猜你喜欢

Pytorch depth separable convolution and mobilenet_ v1

Phabricator Conduit API介绍

机器学习笔记 - 使用 GAN 进行数据增强以进行缺陷检测

Current mirror automatic layout symmetry: quantification and application to eliminate nonlinear process gradients

New construction process of Hongmeng application development project and generation method of HAP package

AcWing 396. 矿场搭建 题解(tarjan割点)

Copy the contents of one folder to another folder

Daily question brushing record (XXV)
![Leetcode high frequency question: three unordered arrays a, B, C with length N, find the total number of combinations of (I, J, K) with a[i] + b[j] + c[k] = 64](/img/b0/8ed026a2fab2a3e6c95be2a6a424d9.png)
Leetcode high frequency question: three unordered arrays a, B, C with length N, find the total number of combinations of (I, J, K) with a[i] + b[j] + c[k] = 64

Huawei and glory mobile phones cannot cooperate with matebook on multiple screens after upgrading the Hongmeng system
随机推荐
裁员之水天上来
Technology cloud report: what is the core ability to build observability?
[enterprise wechat self built application development]
Linux服务器装mysql数据库(详细教程)
乐视成了反内卷之王:员工过上了没有996的神仙日子!
markdown 数学公式 任意符号 存在符号
Do you know the answers to the common questions in the interview of senior programmers? With answer
activity组件导出实验
New construction process of Hongmeng application development project and generation method of HAP package
Machine learning BP (back propagation) neural network
Phabricator Conduit API介绍
Gd32f4 (6): serial port garbled caused by crystal oscillator
OSPF route management
Multithreaded operation list
How to describe variables: storage class, life cycle, scope, link attribute
【黄啊码】为什么我建议您选择go,而不选择php?
Blog migration from cloudbase to virtual machine
[Huang ah code] getting started with MySQL - 2. Using data definition language (DDL) to operate the database
R language uses LM function to build regression model and BoxCox function of mass package to find the best power transformation to improve the fitting degree of the model (determine the best λ Paramet
True question of CCF (anger takes 100 faints)