当前位置:网站首页>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]#
最后,谢谢关注,谢谢支持!
边栏推荐
猜你喜欢
[image sensor] correlated double sampling CDs
Horizontal and vertical centering method and compatibility
SlashData开发者工具榜首等你而定!!!
Direct dry goods, 100% praise
Module VI
Pychart ide Download
最新阿里P7技术体系,妈妈再也不用担心我找工作了
QT 图片背景色像素处理法
数据中台落地实施之法
Skimage learning (2) -- RGB to grayscale, RGB to HSV, histogram matching
随机推荐
Flask搭建api服务-生成API文档
Arduino 控制的双足机器人
QML beginner
DNS 系列(一):为什么更新了 DNS 记录不生效?
Deep listening array deep listening watch
null == undefined
一文读懂数仓中的pg_stat
SIGGRAPH 2022最佳技术论文奖重磅出炉!北大陈宝权团队获荣誉提名
Skimage learning (3) -- adapt the gray filter to RGB images, separate colors by immunohistochemical staining, and filter the maximum value of the region
Pisa-Proxy SQL 解析之 Lex & Yacc
Advanced C language -- function pointer
最新Android高级面试题汇总,Android面试题及答案
LeetCode 1049. 最后一块石头的重量 II 每日一题
[designmode] facade patterns
ATM系统
ORACLE进阶(六)ORACLE expdp/impdp详解
服务器彻底坏了,无法修复,如何利用备份无损恢复成虚拟机?
AI来搞财富分配比人更公平?来自DeepMind的多人博弈游戏研究
SlashData开发者工具榜首等你而定!!!
整理几个重要的Android知识,高级Android开发面试题