当前位置:网站首页>Installer MySQL sous Linux [détails]
Installer MySQL sous Linux [détails]
2022-06-26 10:34:00 【Yli Jing.】
1、Télécharger le paquet d'installation(ParMysql5.7Par exemple)
Mode de téléchargement 1https://dev.mysql.com/downloads/mysql/5.7.html

Mode de téléchargement 2:
wget http://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.36-linux-glibc2.12-x86_64.tar.gz
2、Pour décompresser
tar -zxvf mysql-5.7.36-linux-glibc2.12-x86_64.tar.gz
Le nom du dossier après décompression est trop long,Peut être renommé
mv mysql-5.7.36-linux-glibc2.12-x86_64 mysql-5.7.36
3、Quelques configurations connexes
Entréemysq-5.7.36Sous la table des matières,Créer un nouveaudataDossiers
mkdir data
Accorder des autorisations:
chmod -R 777 data
Créer un utilisateur、Informations sur le Groupe
groupadd mysql
useradd -g mysql mysql
Modifieretc/my.cnfDocumentation, Voici tout le contenu , Notez que le chemin est changé en votre propre chemin d'installation
[mysqld]
bind-address=0.0.0.0
port=3306
user=mysql
basedir=/qijingjing/resource/mysql/mysql-5.7.36
datadir=/qijingjing/resource/mysql/mysql-5.7.36/data
socket=/tmp/mysql.sock
log-error=/qijingjing/resource/mysql/mysql-5.7.36/data/mysql.err
pid-file=/qijingjing/resource/mysql/mysql-5.7.36/data/mysql.pid
character_set_server=utf8mb4
symbolic-links=0
explicit_defaults_for_timestamp=true
Entréemysql5.7.36Debin Exécutez la commande suivante sous le répertoire (Attention!: Le chemin modifie votre propre )
./mysqld --initialize --user=mysql --datadir=/qijingjing/resource/mysql/mysql-5.7.36/data/ --basedir=/qijingjing/resource/mysql/mysql-5.7.36/
C'est exact.mysql Mot de passe de génération par défaut pour la visualisation ( J'ai besoin d'aide. )
cat /qijingjing/resource/mysql/mysql-5.7.36/data/mysql.err

Ajouter une connexion souple-> Pour que nous puissions démarrer dans n'importe quel répertoire mysql
ln -s /qijingjing/resource/mysql/mysql-5.7.36/support-files/mysql.server /etc/init.d/mysql
ln -s /qijingjing/resource/mysql/mysql-5.7.36/bin/mysql /usr/bin/mysql
service mysql restart
Débarquementmysql
Démarrage
service mysql start
Débarquement
mysql -uroot -p
Entrez le mot de passe pour vous connecter :
Modifier le mot de passe
set password=password(' Le mot de passe que vous devez définir ');
flush privileges;
Modifier les droits d'accès
use mysql;
update user set Host='%' where User='root';
flush privileges;
4、Accès externe
L'accès à l'Extranet nécessite la correspondance du pare - feu 3306Port Release, Faites ce qui suit
firewall-cmd --zone=public --add-port=3306/tcp --permanent
systemctl restart firewalld.service
Si c'est un ECS , Pour configurer la mainlevée dans le Groupe de sécurité :

Par ici.,Nous pouvons utiliserSQLyogOuNavicat Outils utilisés pour la connexion .
边栏推荐
- Searchview click failure
- Global and Chinese markets of children's electronic thermometers 2022-2028: Research Report on technology, participants, trends, market size and share
- 904. 水果成篮
- Luogu 1146 coin flip
- Global and Chinese market of electronic pet door 2022-2028: Research Report on technology, participants, trends, market size and share
- 【无标题】
- exec系列函数(execl、execlp、execle、execv、execvp)使用
- Detailed explanation of winsorflow quantum installation process
- How to start the learning journey of webrtc native cross platform development?
- What is a botnet
猜你喜欢

MySQL第十三次作业-事务管理

Use of exec series functions (EXECL, execlp, execle, execv, execvp)

MySQL第八次作业

【Leetcode】76. Minimum covering substring

開發者,微服務架構到底是什麼?

MySQL 8th job

Enter a positive integer with no more than 5 digits, and output the last digit in reverse order

The IE mode tab of Microsoft edge browser is stuck, which has been fixed by rolling back the update

瑞萨电子面向物联网应用推出完整的智能传感器解决方案

See how I store integer data in the map < string, string > set
随机推荐
leetCode-链表的中间结点
利用foreach循环二维数组
Oracle11g 启动数据库时报错 ORA-27154: post/wait create failed
Allocation of heap memory when creating objects
MySQL第十二次作业-存储过程的应用
How to change the QR code material color of wechat applet
US President signs community safety act to deal with gun issue
工程数学概率论统计简明教程第二版复习大纲
MySQL第十四次作业--电子商城项目
Global and Chinese market of cryogenic bulk tanks 2022-2028: Research Report on technology, participants, trends, market size and share
JVM垃圾回收什么情况会进入老年代
VS或Qt编译链接过程中出现“无法解析的外部符号”的原因:
June training (the 26th day) - collective search
AIX基本操作记录
Function run time
Luogu 1146 coin flip
Jar version conflict resolution
Blog post index summary --c #
The fourteenth MySQL operation - e-mall project
AdaptiveAvgPool2D 不支持 onnx 导出,自定义一个类代替 AdaptiveAvgPool2D