---
title: "MySQL服务端配置"
author: "Perrin Yong"
author_profile: https://www.pystone.net/profile/
published_by: "Perrin Yong"
canonical: https://www.pystone.net/notes/mysql-server-configuration/
type: note
content_role: unspecified
visibility: public
id_stability: rename-stable
source_path: "10-计算机、信息技术与工程/04-应用开发与云端工程/后端与数据库/MySQL服务端配置.md"
content_hash: 11fe7d7e622a630972385c603dd5f059b1d9827cee35c30d5cf26205868b2554
knowledge_version: 224c990773de.5fa8af6e39fa
site_commit: 224c990773de166d23a886306577dd90379529ce
notes_commit: 5fa8af6e39fa3891d1b9b4832bfa6c4e0ecaaf0a
---
# MySQL服务端配置
如何启动/停止/重启MySQL
一、 启动方式
1、使用 service 启动：

service mysql start

2、使用 mysqld 脚本启动：

/etc/inint.d/mysql start

3、使用 safe_mysqld 启动：

safe_mysql&

二、停止
1、使用 service 启动：

service mysql stop

2、使用 mysqld 脚本启动：

/etc/inint.d/mysql stop

3、执行mysqladmin shutdown

mysqladmin shutdown

三、重启
1、使用 service 启动：

service mysql restart
2、使用 mysqld 脚本启动：

/etc/inint.d/mysql restart
其实有时mysql已经正 常启动了，查看mysql是否启动命令

ps -aux | grep mysqld

查看mysql是否在监 听端口命令

netstat -tl | grep mysql

会看到如下类似内容

tcp 0 0 *:mysql *:* LISTEN
————————————————
版权声明：本文为CSDN博主「suwu150」的原创文章，遵循CC 4.0 BY-SA版权协议，转载请附上原文出处链接及本声明。
原文链接：https://blog.csdn.net/suwu150/article/details/52719371
