当前位置:网站首页>Installing MySQL for Linux
Installing MySQL for Linux
2022-06-11 05:51:00 【Like the wind holding hands】
1、 Check if... Has been installed mysql
rpm -qa | grep mysql
2. If there is a deletion
rpm -e --nodeps mysql-libs- edition
3. Check mysql User groups and users , Create if not
cat /etc/group | grep mysql
cat /etc/passwd |grep mysql
groupadd mysql
useradd -r -g mysql mysql
4. download mysql Installation package
mkdir /usr/local/mysql # create a file
# establish data Catalog
mkdir /usr/local/mysql/data
cd mysql
wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.24-linux-glibc2.12-x86_64.tar.gz
5. decompression
tar xzvf mysql-5.7.24-linux-glibc2.12-x86_64.tar.gz
6. Compile, install and initialize mysql
cd /usr/local/mysql/bin
./mysqld --initialize --user=mysql --datadir=/usr/local/mysql/data --basedir=/usr/local/mysql
#[Note] A temporary password is generated for [email protected]: 7(h4l>Qnj8t3# Is password
7. start-up mysql
/usr/local/mysql/support-files/mysql.server start
If the following message appears
Starting MySQL.Logging to '/usr/local/mysql/data/iZge8dpnu9w2d6Z.err'.
# Query service
ps -ef|grep mysql
ps -ef|grep mysqld
kill -9 pid # Stop the process
8. Add soft connection , And restart mysql service
ln -s /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql
ln -s /usr/local/mysql/bin/mysql /usr/bin/mysql
service mysql restart
# Successful launch !
MySQL server process #3257 is not running! [FAILED]
Starting MySQL. [ OK ]
9. Isochronous mysql, Change Password
mysql -u root -p
First install and then , Executing any instruction will prompt :
ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
Change the temporary password
>ALTER USER 'root'@'localhost' IDENTIFIED BY '123456' PASSWORD EXPIRE NEVER;
Refresh the permissions
>flush privileges;
10. Develop remote connections
>use mysql;
>update user set user.Host='%' where user.User='root';
>flush privileges;
边栏推荐
- 11. Gesture recognition
- More than 20 cloud collaboration functions, 3 minutes to talk through the enterprise's data security experience
- 那个酷爱写代码的少年后来怎么样了——走近华为云“瑶光少年”
- Solution to slow connection speed of ojdbc under Linux system
- Manually splicing dynamic JSON strings
- Deep learning distributed training
- Méthode de la partie du tableau
- What happened to the young man who loved to write code -- approaching the "Yao Guang young man" of Huawei cloud
- Altiumdesigner2020 import 3D body SolidWorks 3D model
- Combing route - Compaction Technology
猜你喜欢

Cocoapods installation error

NFC Development -- the method of using NFC mobile phones as access control cards (II)

NDK learning notes (VI) Basics: memory management, standard file i/o

使用Genymotion Scrapy控制手机

More than 20 cloud collaboration functions, 3 minutes to talk through the enterprise's data security experience

Big meal count (time complexity) -- leetcode daily question

数据接入平台方案实现(游族网络)

Multithreading tutorial (XXI) double checked locking problem

Jsonobject jsonarray for parsing

Pycharm usage experience
随机推荐
跨境电商测评自养号团队应该怎么做?
MySQL circulates multiple values foreach, XML writing method
初步了解多任务学习
BERT知识蒸馏
Do we really need conference headphones?
ELK日志系统实战(五):安装vector并将数据输出到es、clickhouse案例
Convert result set of SQL to set
Mingw-w64 installation instructions
Swap numbers (no temporary variables)
NFC Development -- difference between ID card and IC card (M1 card and CPU card) (III)
微信自定义组件---样式--插槽
Solution to slow connection speed of ojdbc under Linux system
使用Batch读取注册表
SwiftUI: Navigation all know
Fix [no Internet, security] problem
使用Genymotion Scrapy控制手机
Es IK installation error
Using batch enumeration files
ReferenceError: server is not defined
Gilde failed to go to the listener to call back the reason record when loading the Gaussian blur image