当前位置:网站首页>centos7安装mysql笔记
centos7安装mysql笔记
2022-07-07 15:33:00 【python与大数据分析】
需要部署在centos7的虚拟机上部署mysql,凭空报了很多错,天下文章一大抄,互联网的不严谨在这里暴露无遗,当然我也是走了很多弯路,删了又装,装了又删,在此不做详述了,只保留最终结果。
按照正常文档安装mysql,会报这个错误。
Failed to start mysqld.service: Unit not found
按照一般的说法,重新卸载mysql,安装mariadb同样也会报错
Failed to start mariadb.service: Unit not found
安装之前,还是先解决wget问题
Last login: Wed Jun :: from 192.168.3.122
[[email protected] ~]# cd /etc
[[email protected] etc]# wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
-bash: wget: 未找到命令
[[email protected] local]# yum install wget
已加载插件:fastestmirror
...此处省略字
已安装:
wget.x86_64 :1.14-18.el7_6.1
完毕!
再下载rpm包,感觉此处没有必要,不过没测试
[[email protected] etc]# wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
--2022-06-15 ::-- http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm
...此处省略字
已安装:
mysql57-community-release.noarch :el7-10
完毕!
通过yum安装mysql-community-server,此处要添加nogpgcheck
[[email protected] etc]# yum -y install mysql-community-server --nogpgcheck
已加载插件:fastestmirror
L...此处省略字
已安装:
mysql-community-server.x86_64 :5.7.38-1.el7
作为依赖被安装:
mysql-community-client.x86_64 :5.7.38-1.el7
mysql-community-common.x86_64 :5.7.38-1.el7
mysql-community-libs.x86_64 :5.7.38-1.el7
完毕!
启动mysql服务,观察状态
[[email protected] etc]# systemctl start mysqld.service
[[email protected] etc]# systemctl status mysqld.service
● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: active (running) since 三 -06-15 :: CST; s ago
Docs: man:mysqld()
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=/SUCCESS)
Process: ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=/SUCCESS)
Main PID: (mysqld)
CGroup: /system.slice/mysqld.service
└─ /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld...
月 :: bogon systemd[]: Starting MySQL Server...
月 :: bogon systemd[]: Started MySQL Server.
[[email protected] etc]#
最后,谢谢关注,谢谢支持!
边栏推荐
- [designmode] template method pattern
- 最新阿里P7技术体系,妈妈再也不用担心我找工作了
- ORACLE进阶(六)ORACLE expdp/impdp详解
- ATM system
- 服务器彻底坏了,无法修复,如何利用备份无损恢复成虚拟机?
- 爬虫(17) - 面试(2) | 爬虫面试题库
- LeetCode 152. Product maximum subarray daily question
- DAPP defi NFT LP single and dual currency liquidity mining system development details and source code
- Opencv personal notes
- Skimage learning (1)
猜你喜欢
Reflections on "product managers must read: five classic innovative thinking models"
Test case management tool recommendation
作为Android开发程序员,android高级面试
[designmode] proxy pattern
Skimage learning (3) -- gamma and log contrast adjustment, histogram equalization, coloring gray images
Horizontal and vertical centering method and compatibility
正在准备面试,分享面经
node:504报错
Skimage learning (1)
爬虫(17) - 面试(2) | 爬虫面试题库
随机推荐
LeetCode 1626. The best team without contradiction
掌握这套精编Android高级面试题解析,oppoAndroid面试题
字节跳动Android金三银四解析,android面试题app
How to add aplayer music player in blog
Number of exchanges in the 9th Blue Bridge Cup finals
Pycharm IDE下载
LeetCode 213. 打家劫舍 II 每日一题
Lowcode: four ways to help transportation companies enhance supply chain management
LocalStorage和SessionStorage
OpenGL personal notes
[designmode] flyweight pattern
值得一看,面试考点与面试技巧
整理几个重要的Android知识,高级Android开发面试题
Build an all in one application development platform, light flow, and establish a code free industry benchmark
LeetCode 1981. 最小化目标值与所选元素的差 每日一题
The process of creating custom controls in QT to encapsulating them into toolbars (II): encapsulating custom controls into toolbars
LeetCode 1696. Jumping game VI daily question
LeetCode 152. Product maximum subarray daily question
《产品经理必读:五种经典的创新思维模型》的读后感
QT video transmission