ITeye博客

【汇总】mysql常用操作【grant,show】

crizy · 2011-10-10 11:00 · mysql · 数据库 · MySQL · Markdown

1.创建拥有全部权限的账户

mysql>grant all privileges on *.* to 用户名@'localhost' identified by '密码';
mysql>flush privileges;

推荐查看详细说明的链接:

http://www.cnblogs.com/hcbin/archive/2010/04/23/1718379.html

 

 

2.最大连接数,响应的最大连接数

(比较理想的设置:Max_used_connections / max_connections * 100% ≈ 85%)

// 最大连接数
mysql> show variables like 'max_connections';
+-----------------+-------+
| Variable_name   | Value |
+-----------------+-------+
| max_connections | 151   |
+-----------------+-------+
1 row in set (0.00 sec)

// 响应的最大连接数 
mysql> show global status like 'Max_used_connections';
+----------------------+-------+
| Variable_name        | Value |
+----------------------+-------+
| Max_used_connections | 152   |
+----------------------+-------+
1 row in set (0.00 sec)

  

 

....

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。