当前位置:网站首页>Notes on installing MySQL in centos7

Notes on installing MySQL in centos7

2022-07-07 17:08:00 Python and big data analysis

It needs to be deployed in centos7 Deployed on the virtual machine of mysql, Many mistakes were reported out of thin air , The world article a big copy , The laxity of the Internet is exposed here , Of course, I also took many detours , Deleted and installed , Installed and deleted , I won't elaborate here , Keep only the final result .

Install according to the normal documentation mysql, Will report the mistake .

Failed to start mysqld.service: Unit not found

In general terms , Uninstall mysql, install mariadb It also reports mistakes

Failed to start mariadb.service: Unit not found

Before installation , Or solve it first wget problem

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:  Command not found 
[[email protected] local]# yum install wget
 Loaded plug-in :fastestmirror
... Omit words here 
 already installed :
  wget.x86_64 :1.14-18.el7_6.1                                                     
 complete !

Download again rpm package , It feels unnecessary here , But no test

[[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
... Omit words here 
 already installed :
  mysql57-community-release.noarch :el7-10                                         
 complete !

adopt yum install mysql-community-server, Add here nogpgcheck


[[email protected] etc]# yum -y install mysql-community-server  --nogpgcheck
 Loaded plug-in :fastestmirror
L... Omit words here 
 already installed :
  mysql-community-server.x86_64 :5.7.38-1.el7                                      
 Installed as a dependency :
  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                                        
 complete !

start-up mysql service , Observation state

[[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  3、 ... and  -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...
 month   :: bogon systemd[]: Starting MySQL Server...
 month   :: bogon systemd[]: Started MySQL Server.

[[email protected] etc]# 

Last , Thank you for your attention , Thank you for your support !

原网站

版权声明
本文为[Python and big data analysis]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/188/202207071532457924.html