当前位置:网站首页>Install MySQL database
Install MySQL database
2022-06-13 03:02:00 【good_ boys】
How to install MySQL database
One 、 install YUM Repo
1、 because CentOS Of yum There is no mysql, Need to mysql Download on yum repo The configuration file .
Download command :
wget https://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm
2、 Then proceed repo Installation :
rpm -ivh mysql57-community-release-el7-9.noarch.rpm
After the execution is completed, it will be in /etc/yum.repos.d/ Two repo file mysql-community.repo mysql-community-source.repo
recommend :MySQL course
Two 、 Use yum Command to complete the installation
Be careful : Must enter into /etc/yum.repos.d/ Then execute the following script
1、 Installation command :
yum install mysql-server
2、 start-up msyql:
systemctl start mysqld # start-up MySQL
3、 Get temporary password for installation ( This is the password you use when you log in for the first time ):
grep ‘temporary password’ /var/log/mysqld.log
4、 If you don't get a temporary password , be
4.1、 Remove the previously installed mysql Residual data
rm -rf /var/lib/mysql
4.2. Restart mysql
systemctl start mysqld # start-up MySQL
- Forget the password :
open mysql5.7 Configuration file for my.cnf, And add a line to it :skip-grant-tables Save and exit (:wq)
restart - use root To login : [[email protected] ~]# mysql -u root
Use mysql Medium mysql database : mysql> use mysql;
Change Password : update user set authentication_string = password(“Szfore_68638”) where user=“root” ;
Refresh database : flush privileges;
sign out : quit;
边栏推荐
- JS multiple judgment writing
- Vs 2022 new features_ What's new in visual studio2022
- Ijkplayer source code - setting options
- Wechat applet obtains the current location (startlocationupdate, onlocationchange, offlocationchange)
- Sword finger offer2: queue summary
- Entity framework extends the actual combat, small project reconfiguration, no trouble
- Node uses post to request req Pit with empty body
- Ijkplayer source code -- mnatemediaplayer of ijkmediaplayer
- Linked list: palindrome linked list
- Professional database management software: Valentina Studio Pro for Mac
猜你喜欢
小程序 input,textarea组件权重比fixed的z-index都高
Introduction to redis (using redis, common commands, persistence methods, and cluster operations)
Logiciel professionnel de gestion de base de données: Valentina Studio Pro pour Mac
Ijkplayer source code ---packetqueue
JVM class loading (I)
Vs 2022 new features_ What's new in visual studio2022
【 enregistrement pytorch】 paramètre et tampon des variables pytorch. Self. Register Buffer (), self. Register Paramètre ()
Flutter reports an error type 'Int' is not a subtype of type 'string' wonderful experience
JMeter quick start
JVM JMM (VI)
随机推荐
数字IC设计——FIFO的设计
SQL execution process in MySQL (3)
Sword finger offer2: queue summary
. Net compact Framework2.0 wince intelligent device development project experience sharing Net drag space advanced
Summary of the latest IOS interview questions in June 2020 (answers)
JMeter quick start
House raiding
js 解构赋值
Ijkplayer source code --- decode
Installing the IK word breaker
[common tools] pyautogui tutorial
Vant realizes the adaptation of mobile terminal
Delphi implements adding a column of serial number to the CXGRID list
How to manage the IT R & D department?
Ijkplayer source code ---packetqueue
MySQL index optimization (4)
Pycharm installation pyqt5 and its tools (QT designer, pyuic, pyrcc) detailed tutorial
Wechat applet coordinate location interface usage (II) map interface
二叉樹初始化代碼
Pytorch record: pytorch variables parameter and buffer. self. register_ buffer()、self. register_ parameter()