当前位置:网站首页>Linux - Install and Start MySQL on Linux Systems
Linux - Install and Start MySQL on Linux Systems
2022-08-07 11:33:00 【Ye Buxiu 233】
Linux - Install and Start MySQL on Linux Systems
Install
dnf install -y mysql-serverSet startup on startup
# View the running status of mysql-serversystemctl status mysqld# In order to avoid the interference of the firewall, in the development environment, we usually turn off the linux firewallsystemctl disable firewalld --now# rm -rf /var/lib/mysql/*# Set mysql-server to start at boot and start immediatelysystemctl enable mysqld --now # Wait patiently for a whileView root initial password
# View the root initial password in the startup log:grep "password" /var/log/mysql/mysqld.logYou will see information similar to the following...is created with an empty password !Initially, the root account password of MySQL Server is blank.Change default root password
Use the root initial password to connect to mysql-server, for example:mysql -u root -pEnter password: mysql 8.0.26 has no default requirements for password security;MySQL 8.0.29 requires uppercase and lowercase alphanumerics and special characters by default, and the length must be more than 8 digits.Enter the following SQL statement to change the root initial password to a custom password:ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'write new password here'; Release remote login restrictions for root account
USE mysql;UPDATE `user` SET `host` = '%' where `user` = 'root' AND `host` = 'localhost';FLUSH PRIVILEGES;exit;Authenticate: Log in with a new password after logging out.Reduce password security requirements, reset root password again
- Note: Configuration can only be done after resetting the initial root password.
Step 1: View and modify related configuration items:SHOW VARIABLES LIKE 'validate_password%';set global validate_password.policy=0;set global validate_password.length=4;SHOW VARIABLES LIKE 'validate_password%';Step 2: Reset root password, reset to simple password:ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123456';边栏推荐
- 【图像融合】基于matlab双树复小波变换像素级图像融合【含Matlab源码 2024期】
- this inside the object points to the problem
- Get all table names and table names with time strings in Mysql Use BetweenAnd to filter the interval range
- 如何仿造websocket请求?
- Mysql事务详解
- flutter打包
- 【合肥工业大学】考研初试复试资料分享
- 精进型全栈工程师应牢记的工程优先级顺序
- 有趣的特性:CHECK约束
- MySQL之COUNT(*)性能到底如何?
猜你喜欢
随机推荐
质量、重力和重量
有趣的特性:CHECK约束
Process events after unity animation ends
聊聊电源自动切换电路(常用自动切换电路总结)
Interpretation of Gin-based Go language project network disk
uboot代码分析
CCNA--GNS3仿真环境的搭建及SecureCRT8.7程序控制台美化调试
try、catch中finally和return执行顺序以及finally对变量操作对变量和结果的影响
Display variables and classes in the Inspector panel (Unity3D)
CVPR2022Oral专题系列(三):图像增强主干网络MAXIM
PG core technology articles--MVCC
介绍几个适用于matlab的colormap
PAT 刷题笔记
Data Structures----带头双向循环链表学习总结1
Linux——在Linux系统上安装和启动MySQL
如何在一个数组中找到三个和为定值的不重复元素? 双指针解决 leetcode 15.三数之和
[Cloud Native--Kubernetes] Security Mechanism
Community Marketing Monetization Model Revealed!How to use the community to sell your products?
uboot code analysis
What is the performance of MySQL's COUNT(*)?









