当前位置:网站首页>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.
边栏推荐
- 使用域名注册服务 Domains配置域名【华为云至简致远】
- 20220801使用安信可的ESP-01S模块实现WIFI的UART传输功能
- Clickhouse填坑记3:Left Join改Right Join导致统计结果错误
- HCIP Fifteenth Day Notes (Three-layer Architecture of Enterprise Network, VLAN and VLAN Configuration)
- Huffman tree
- 【报错】ImportError: libpng16-57e5e0a0.so.16.37.0: cannot open shared object file: No such file or direc
- 使用Typora+EasyBlogImageForTypora写博客,无图床快速上传图片
- 552个元宇宙App,70个搞社交,哪款真能交到朋友?
- ideaIU-2020.1下载
- VMware 虚拟机如何连接网络「建议收藏」
猜你喜欢
随机推荐
【MATLAB项目实战】基于CNN_SVM的图像花卉识别
用1000行代码统计西安新房价格后,我有一个惊人的发现……
APT组织最喜欢的工具 Cobalt Strike (CS) 实战
【问题】使用pip安装第三方库的时候遇到“timeout”的解决方法
项目管理:PMP和IPMP哪个更值得考?两个证书的区别在于哪里?
云硬盘EVS详解以及如何用与避坑【华为云至简致远】
chrome浏览器对应驱动_chrome手机浏览器
UE4 C disk cache solution
Day2:面试必考题目
数据分析(二)——numpy
关于 vditor 可否同步飞书文档问题
PMP每日一练 | 考试不迷路-8.3(包含敏捷+多选)
使用域名注册服务 Domains配置域名【华为云至简致远】
PAT乙级-B1014 福尔摩斯的约会(20)
varchar2和varchar2(char)_datetime数据类型
HCIP Day 16 Notes (SVI, Spanning Tree Protocol)
GDB调试CoreDump文件
GMapping原理分析[通俗易懂]
【R语言科研绘图】--- 柱状图
162_Power Query is a custom function for quickly merging tables in a folder TableXlsxCsv_2.0









