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

# 检查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

  

posted @ 2016-01-11 21:32  会飞的鱼鱼鱼  阅读(263)  评论(0编辑  收藏  举报