当前位置:网站首页>Several methods of installing Mysql in Linux
Several methods of installing Mysql in Linux
2022-08-03 14:45:00 【MZdzt】
Several ways of database installation
1, yum online installation
(1) Download the official yum repository of MYSQl
[[email protected]~]#dnf install https://repo.mysql.com//mysql80-community-release-el9-1.noarch.rpm(2) Install MYSQL service
[[email protected] ~]# dnf install mysql-server(3) Start the service
[[email protected] ~]# systemctl start mysqld(4) View the initial password
[[email protected] ~]# grep 'temporary password' /var/log/mysqld.log(5) Log in with the initial password
[[email protected] ~]# mysql -uroot -pEnter password: temporary password(6) Change the password (note: uppercase and lowercase plus symbols)
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'XXXXXXXXX';2, rpm local installation
(1) Download the rpm package from the MYSQL official website
(2) Transfer the rpm package from windows to linux via ftp
(3) Unzip the rpm package
[[email protected] ~]# tar -xzvf mysql-8.0.30-1.el9.x86_64.rpm-bundle.tar(4) dnf/yum for installation
[[email protected] ~]# dnf localinstall mysql-community-server-8.0.30-1.el9.x86_64.rpm \mysql-community-client-8.0.30-1.el9.x86_64.rpm\mysql-community-common-8.0.30-1.el9.x86_64.rpm\mysql-community-icu-data-files-8.0.30-1.el9.x86_64.rpm\mysql-community-libs-8.0.30-1.el9.x86_64.rpm\mysql-community-client-plugins-8.0.30-1.el9.x86_64.rpm(5) Start the service
[[email protected] ~]# systemctl start mysqld(6) View the initial password
[[email protected] ~]# grep 'temporary password' /var/log/mysqld.log(7) Log in with the initial password
[[email protected] ~]# mysql -uroot -pEnter password: temporary password(8) Change the password (note: uppercase and lowercase plus symbols)
mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'XXXXXXXXX';3. Install MYSQL from source code
(1) Create a directory mysql and transfer the source package to this directory and decompress it
[[email protected] ~]# mkdir /mysql[[email protected] ~]# mv mysql-boost-8.0.29.tar.gz /mysql/[[email protected] ~]# cd /mysql/[[email protected] mysql]# tar xvf mysql-boost-8.0.29.tar.gz(2) Enter the directory after the decompression is completed, and add the group and group members
[[email protected] mysql]# cd mysql-8.0.29/[[email protected] mysql-8.0.29]# groupadd mysql[[email protected] mysql-8.0.29]# useradd -r -g mysql -s /bin/false mysql(3) Create a bld file, switch to this file and download the packages needed for the next compilation
[[email protected] mysql-8.0.29]# mkdir bld[[email protected] mysql-8.0.29]# cd bld/[[email protected] bld]# dnf install cmake gcc gcc-c++[[email protected] bld]# yum install gcc-toolset-11-gcc gcc-toolset-11-gcc-c++ gcc-toolset-11-binutils ncurses-devel libtirpc-devel(4) At this time, the download will report an error, because there is no rpcgen package in the local warehouse, which requires us to download it by ourselves
[[email protected] bld]# rpm -i rpcgen-1.3.1-4.el8.x86_64.rpm(5) Start cmake
[[email protected] bld]# cmake .. -DDOWNLOAD_BOOST=1 -DWITH_BOOST=../boost/boost_1_77_0/(6) make; mark install
[[email protected] bld]# make;make install(7) After method 1 or 2, start the service, check the initial password, log in, and change the password.
边栏推荐
猜你喜欢
随机推荐
淘特:引擎还是包袱?
2022-随便学学
LeetCode15:三数之和
APT组织最喜欢的工具 Cobalt Strike (CS) 实战
STL——vector
[A summary of the sorting and use of activation functions in deep learning]
系统学习Shell之正则表达式
兆骑科创创业大赛,双创服务平台,线上直播路演
Left index of all anagrams in leetcode/string (some permutation of s1 string is a substring of s2)
【R语言科研绘图】--- 柱状图
【web渗透】CSRF漏洞详细讲解
HCIP Day 16 Notes (SVI, Spanning Tree Protocol)
【问题】torch和torchvision对应版本
petri网-1、概论
C语言中操作符的详细介绍
数据分析(二)——numpy
MySQL【视图】
网络数据集-骨干网和校园网-IP流量
驻尼日利亚使馆发布阿布贾祖玛岩附近地区紧急安全预警
idea找不到class,gradle依赖已经加载,并且class可看








