当前位置:网站首页>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.
边栏推荐
- LeetCode15:三数之和
- Leetcode 448. Find All Numbers Disappeared in an Array to Find All Disappeared in an Array of Numbers (simple)
- 162_Power Query 快速合并文件夹中表格之自定义函数 TableXlsxCsv_2.0
- PMP每日一练 | 考试不迷路-8.3(包含敏捷+多选)
- ideaIU-2020.1下载
- node项目开发踩坑(一)
- PostgreSQL V14中更好的SQL函数
- Controller层代码这么写,简洁又优雅!
- 【R语言科研绘图】--- 柱状图
- 如何在 UE4 中制作一扇自动开启的大门
猜你喜欢
随机推荐
STL简介
Mysql 生成排序序号
英文邮件总结
VMware 虚拟机如何连接网络「建议收藏」
20220801使用安信可的ESP-01S模块实现WIFI的UART传输功能
高性能创作本,日常修图剪辑选华硕无畏Pro15 2022完全足矣!
大型连锁百货运维审计用什么软件好?有哪些功能?
币圈提款机:Solana钱包出现未知安全漏洞 大量用户数字资产被盗
三元表达式实现多个条件的判断
驻尼日利亚使馆发布阿布贾祖玛岩附近地区紧急安全预警
不安装运行时运行.NET程序
Controller层代码这么写,简洁又优雅!
兆骑科创高层次人才引进平台,创新创业赛事活动路演
大势,又一关乎中美竞争的关键行业,走到关键时刻了
15 years of software architect experience summary: In the ML field, 5 pits that beginners have stepped on
个人秋招记录——欢迎交流
项目管理:PMP和IPMP哪个更值得考?两个证书的区别在于哪里?
go map转struct【mapstructure库】
你把 vite打包 玩明白
HCIP Day 16 Notes (SVI, Spanning Tree Protocol)









