当前位置:网站首页>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]#
最后,谢谢关注,谢谢支持!
边栏推荐
- LocalStorage和SessionStorage
- [designmode] facade patterns
- 《产品经理必读:五种经典的创新思维模型》的读后感
- Test case management tool recommendation
- SqlServer2014+: 创建表的同时创建索引
- LeetCode 1986. 完成任务的最少工作时间段 每日一题
- LeetCode 1049. 最后一块石头的重量 II 每日一题
- Horizontal and vertical centering method and compatibility
- LeetCode 1696. Jumping game VI daily question
- time标准库
猜你喜欢
ByteDance Android gold, silver and four analysis, Android interview question app
[designmode] facade patterns
整理几个重要的Android知识,高级Android开发面试题
最新Android面试合集,android视频提取音频
谈谈 SAP 系统的权限管控和事务记录功能的实现
time标准库
科普达人丨一文弄懂什么是云计算?
QT中自定义控件的创建到封装到工具栏过程(一):自定义控件的创建
Master this set of refined Android advanced interview questions analysis, oppoandroid interview questions
null == undefined
随机推荐
服务器彻底坏了,无法修复,如何利用备份无损恢复成虚拟机?
Master this set of refined Android advanced interview questions analysis, oppoandroid interview questions
ATM system
LeetCode 300. 最长递增子序列 每日一题
Process from creation to encapsulation of custom controls in QT to toolbar (I): creation of custom controls
LeetCode 1049. Weight of the last stone II daily question
skimage学习(3)——Gamma 和 log对比度调整、直方图均衡、为灰度图像着色
【MySql进阶】索引详解(一):索引数据页结构
Blue Bridge Cup final XOR conversion 100 points
Pycharm IDE下载
Test case management tool recommendation
Ray and OBB intersection detection
[medical segmentation] attention Unet
蓝桥杯 决赛 异或变换 100分
浅谈 Apache Doris FE 处理查询 SQL 源码解析
A tour of gRPC:03 - proto序列化/反序列化
模块六
LeetCode-SQL第一天
作为Android开发程序员,android高级面试
node:504报错