当前位置:网站首页>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]#
最后,谢谢关注,谢谢支持!
边栏推荐
- LeetCode 1155. 掷骰子的N种方法 每日一题
- 直接上干货,100%好评
- 预售17.9万,恒驰5能不能火?产品力在线,就看怎么卖
- ByteDance Android gold, silver and four analysis, Android interview question app
- Deep listening array deep listening watch
- 【视频/音频数据处理】上海道宁为您带来Elecard下载、试用、教程
- Master this promotion path and share interview materials
- os、sys、random标准库主要功能
- 两类更新丢失及解决办法
- Talk about the realization of authority control and transaction record function of SAP system
猜你喜欢
随机推荐
99% 用户在 Power BI 云端报表常犯错误
最新2022年Android大厂面试经验,安卓View+Handler+Binder
Binary search tree (basic operation)
Seaborn数据可视化
The process of creating custom controls in QT to encapsulating them into toolbars (II): encapsulating custom controls into toolbars
如何在博客中添加Aplayer音乐播放器
null == undefined
skimage学习(1)
在哪个期货公司开期货户最安全?
《产品经理必读:五种经典的创新思维模型》的读后感
Process from creation to encapsulation of custom controls in QT to toolbar (I): creation of custom controls
LeetCode 1696. 跳跃游戏 VI 每日一题
谎牛计数(春季每日一题 53)
网关Gateway的介绍与使用
【Seaborn】组合图表:PairPlot和JointPlot
最新高频Android面试题目分享,带你一起探究Android事件分发机制
LeetCode 1043. 分隔数组以得到最大和 每日一题
Sort out several important Android knowledge and advanced Android development interview questions
Shallow understanding Net core routing
最新Android高级面试题汇总,Android面试题及答案