MySQL权限管理
/* CSS Document */
body {
font: normal 11px auto "Trebuchet MS", verdana, arial, helvetica, sans-serif;
color: #4f6b72;
background: #e6eae9;
}
a {
color: #c75f3e;
}
table{
padding: 0;
margin: 0;
border-left: 1px solid #c1dad7;
}
caption {
padding: 0 0 5px 0;
width: 700px;
font: italic 11px "Trebuchet MS", verdana, arial, helvetica, sans-serif;
text-align: right;
}
th {
font: bold 11px "Trebuchet MS", verdana, arial, helvetica, sans-serif;
color: #4f6b72;
border-right: 1px solid #c1dad7;
border-bottom: 1px solid #c1dad7;
border-top: 1px solid #c1dad7;
letter-spacing: 2px;
text-transform: uppercase;
text-align: left;
padding: 6px 6px 6px 12px;
background: #cae8ea url(images/bg_header.jpg) no-repeat;
}
th.nobg {
border-top: 0;
border-left: 0;
border-right: 1px solid #c1dad7;
background: none;
}
td {
border-right: 1px solid #c1dad7;
border-bottom: 1px solid #c1dad7;
background: #fff;
font-size:11px;
padding: 6px 6px 6px 12px;
color: #4f6b72;
}
td.alt {
background: #f5fafa;
color: #797268;
}
th.spec {
border-left: 1px solid #c1dad7;
border-top: 0;
background: #fff url(images/bullet1.gif) no-repeat;
font: bold 10px "Trebuchet MS", verdana, arial, helvetica, sans-serif;
}
th.specalt {
border-left: 1px solid #c1dad7;
border-top: 0;
background: #f5fafa url(images/bullet2.gif) no-repeat;
font: bold 10px "Trebuchet MS", verdana, arial, helvetica, sans-serif;
color: #797268;
} MySQL用GRANT,REVOKE命令授予和移除用户权限
CODE:
GRANT USAGE ON * TO 'will'@'localhost' IDENTIFIED BY 'will';
MySQL存储过程的权限控制:
建立存储过程时这样建立:
CODE:
CREATE PROCEDURE p()
SQL SECURITY INVOKER
相关文档:
Why you should ignore MySQL’s key cache hit ratio
http://www.mysqlperformanceblog.com/2010/02/28/why-you-should-ignore-mysqls-key-cache-hit-ratio/
不要相信mysql的key cache hit ratio:
key cache hit ratio = 1 - key_reads / key_read_requests
key_reads:从磁盘中读块的数量
key_read_request ......
存储引擎 支持索引 myisam b-tree,r-tree,full-text,不支持hash innodb b-tree(clustered-index) merge b-tree,r-tree memory b-tree,hash archive 无索引 ......
有时候使用MySQL(和PHP搭配之最佳组合)命令行导入备份时会出现“MySQL(和PHP搭配之最佳组合) server has gone away”错误,这可能是因为其中一些insert语句的大小超出了MySQL(和PHP搭配之最佳组合)目前设置的缓冲区大小。
解决办法
1.使用phpmyadmin 备份MySQL(和PHP搭配之最佳组合)的时候,只选择
数据:
......
在Ubuntu9.10上使用sudo apt-get install mysql-server-5.0 安装了mysql,在外面访问不了mysql,但是在Ubuntu上访问是没有问题的。
于是开始查找原因:
3306端口是不是没有打开?
使用nestat命令查看3306端口状态:
~# netstat -an | grep 3306
tcp 0   ......
分页功能在任何应用中都比较常见,而
Mysql
的存储过程分页必须通过动态
sql
来执行。分页对应的
offset
和
row_count
必须先用
concat
函数变成字符串组装到
sql
中(如语句
1
),而不能直接使用(如语句
2
,
Mysql
不支持)。
Mysql
分页功能的实现如下代码所示:
&nbs ......