【Linux命令】数据库mysql配置命令

2023-04-07编程技术40157

# 检查MySQL服务器系统进程
~ ps -aux|grep mysql
mysql 1103 0.0 0.3 492648 51780 ? Ssl 14:04 0:21 /usr/sbin/mysqld
sharon 15918 0.0 0.0 15940 968 pts/4 S+ 21:36 0:00 grep --color=auto mysql # 检查MySQL服务器占用端口
~ netstat -nlt|grep 3306
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN # 通过启动命令检查MySQL服务器状态
~ sudo /etc/init.d/mysql status
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners. Server version 5.5.46-0ubuntu0.14.04.2
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /var/run/mysqld/mysqld.sock
Uptime: 7 hours 32 min 18 sec Threads: 1 Questions: 119 Slow queries: 0 Opens: 48 Flush tables: 1 Open tables: 41 Queries per second avg: 0.004 # 通过系统服务命令检查MySQL服务器状态
~ service mysql status
status: Unknown job: mysql

  

【Linux命令】数据库mysql配置命令的相关教程结束。

本文地址:https://www.ufcn.cn/tutorials/2423409.html

如非特殊说明,本站内容均来自于网友自主分享,概不代表本站观点,如有任何问题我们都将在收到反馈后的第一时间进行处理!