当前位置:网站首页>Start, close and view MySQL service (Linux)
Start, close and view MySQL service (Linux)
2022-07-22 10:17:00 【Billion technology】
start-up , close , see MySQL service Linux
- see MySQL Status of the service
[[email protected] ~]$ systemctl status mysqld.service
● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: active (running) since 5、 ... and 2022-07-15 09:33:30 CST; 43min ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 1370 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS)
Process: 989 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Main PID: 1374 (mysqld)
CGroup: /system.slice/mysqld.service
└─1374 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid
7 month 15 09:33:26 hadoop102 systemd[1]: Starting MySQL Server...
7 month 15 09:33:30 hadoop102 systemd[1]: Started MySQL Server.
- close MySQL service
[[email protected] ~]$ sudo systemctl stop mysqld.service
[[email protected] ~]$ systemctl status mysqld.service
● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: inactive (dead) since 5、 ... and 2022-07-15 10:22:53 CST; 2s ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 5101 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS)
Process: 5079 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Main PID: 5104 (code=exited, status=0/SUCCESS)
7 month 15 10:22:34 hadoop102 systemd[1]: Starting MySQL Server...
7 month 15 10:22:35 hadoop102 systemd[1]: Started MySQL Server.
7 month 15 10:22:52 hadoop102 systemd[1]: Stopping MySQL Server...
7 month 15 10:22:53 hadoop102 systemd[1]: Stopped MySQL Server.
- start-up MySQL service
[[email protected] ~]$ sudo systemctl start mysqld.service
[[email protected] ~]$ systemctl status mysqld.service
● mysqld.service - MySQL Server
Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
Active: active (running) since 5、 ... and 2022-07-15 10:24:00 CST; 2s ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 5195 ExecStart=/usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid $MYSQLD_OPTS (code=exited, status=0/SUCCESS)
Process: 5169 ExecStartPre=/usr/bin/mysqld_pre_systemd (code=exited, status=0/SUCCESS)
Main PID: 5198 (mysqld)
CGroup: /system.slice/mysqld.service
└─5198 /usr/sbin/mysqld --daemonize --pid-file=/var/run/mysqld/mysqld.pid
7 month 15 10:24:00 hadoop102 systemd[1]: Starting MySQL Server...
7 month 15 10:24:00 hadoop102 systemd[1]: Started MySQL Server.
- Set to MySQL Boot up service ( Suggest )
[[email protected] ~]$ sudo systemctl enable mysqld.service
- Check whether the self startup has been set successfully
[[email protected] ~]$ systemctl list-unit-files | grep mysqld
mysqld.service enabled
mysqld[email protected] disabled
- close MySQL Boot up service
[[email protected] ~]$ sudo systemctl disable mysqld.service
Removed symlink /etc/systemd/system/multi-user.target.wants/mysqld.service.
[[email protected] ~]$ systemctl list-unit-files | grep mysqld
mysqld.service disabled
[email protected] disabled
- restart MySQL service
[[email protected] hive-3.1.2]$ sudo systemctl restart mysqld.service
边栏推荐
- 背会这些面试题,任何技术面能成功一半
- Set实现类
- Use epoll to manage or golang multiprocess in case of a large number of connections
- 2022百度世界大会收官 希壤元宇宙露天巨幕&定制会场首秀
- 假设div里面设置overflow:hidden,里面有select框,被遮住怎么办?
- Short video live source code, uniapp jump page carries Id
- JS type conversion
- HCIP(9)
- Information generation of College Students' back to school list - Tencent cloud scene connector National College Innovation Competition
- Explanation of fast SCNN and implementation using tensorflow 2.0
猜你喜欢
RHCSA 浏览普通文件使用方法、grep、cut、uniq、sort、tr命令的使用
高度关注,2022开放原子开源峰会最新议程一览
Background login verification of black maredge takeout filter (detailed notes)
Service & Endpoint
Cocoscreator mobile game multi screen adaptation
Explanation of fast SCNN and implementation using tensorflow 2.0
仅需3 小时,如何用 AI 做场景贴图,完成场景制作 ?AI创作工作流探索
Crazy God redis notes 07
那些测试员面试中的“潜规则”,千万不要踩坑
"Everything is interconnected, enabling thousands of industries", the 2022 open atom global open source summit openatom openharmony sub forum is about to open
随机推荐
EasyCVR平台级联时,出现报错提示端口不可达是什么原因?
Highly concerned, list of the latest agenda of 2022 open atom open source Summit
分享一个GO 辅助命令行
RHCSA 硬链接与软链接的区别、一级目录的解释、重定向、创建文件及目录、删除文件及目录、cp命令的使用、mv命令的使用
Crazy God redis notes 07
C # and CAD secondary development, 20220721 essay code
Information generation of College Students' back to school list - Tencent cloud scene connector National College Innovation Competition
软件测试过程的持续改进
等额本金递增还款/等额本金递减按揭房贷还款计算器
集合(Properties)
Set set
Ingress
To solve the pain points of API development, which is better, API post or API box?
Redis client integration Prometheus indicators
这项比赛有点逆天!鲲鹏应用创新大赛openEuler赛道全面开启
英特尔携手百度推动产业智能化进程,共筑绿色未来
你第一篇SCI写了几个月?(第二部分)
Speech by Lu Shouqun, honorary chairman of copu, at the 17th open source China open source World Summit Forum
A series of problems of house raiding
Google Earth Engine(GEE)—— 下载一个最简单的sentinel-2影像的单日ndvi下载