Archive

标签为 ‘centos’的文章

linode的centos5.X安装pptp的vpn

前段时间用ssh隧道翻墙,满足了日常的需要,但是iphone用不了这个,想用pptp搞个简单的vpn可以给cydia用。

linode的vps还是满好的,假设pptp也很方便,网上的教程有点老,iptable部分遇到一些问题,下面就说说架设的步骤:

完整阅读

centos 启动的错误

昨晚把centos搞出问题了,貌似是强制关机导致的
重启时出现以下错误信息
unexpected inconsistency;RUN fsck MANUALLY
An error occurred during the filesystem check
Propping you to shell the system will reboot
when you leave the shell
Give root password for mantennance

  完整阅读

Mysql权限-存储过程部分

环境:
system: CentOS release 5.3
mysql: 5.0.45
phpMyAdmin:2.11.9.5
问题:
新建一个用户testuser
赋予它操作一个数据库testdb的全部权限:
[sql]
REVOKE ALL PRIVILEGES ON * . * FROM ‘testuser’@'%’;
GRANT ALL PRIVILEGES ON `testdb` . * TO ‘testuser’@'%’ WITH GRANT OPTION ;
[/sql]
testuser查看不了testdb的存储过程
只看到 [sql]Drop PROCEDURE `testPro` // 【testPro是testdb的存储过程】[/sql]
所有的操作都是通过phpMyadmin操作的
分析:
按道理说,既然赋予了testuser对testdb的所有权限,testuser应该可以查看testdb的存储过程
但是却查看不了,为何?
找了很久,不知道原因
解决方法:
使用一个root权限的用户登录
执行
[sql]
REVOKE ALL PRIVILEGES ON * . * FROM ‘testuser’@'%’;
GRANT ALL PRIVILEGES ON * . * TO ‘testuser’@'%’ WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UpdateS_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ;
[/sql]
【这是赋予了testuser所有的权限】
然后手动删除mysql数据库的user表中的权限
[sql]
Update `mysql`.`user` SET `Select_priv` = ‘N’,
`Insert_priv` = ‘N’,
`Update_priv` = ‘N’,
`Delete_priv` = ‘N’,
`Create_priv` = ‘N’,
`Drop_priv` = ‘N’,
`Reload_priv` = ‘N’,
`Shutdown_priv` = ‘N’,
`Process_priv` = ‘N’,
`File_priv` = ‘N’,
`Grant_priv` = ‘N’,
`References_priv` = ‘N’,
`Index_priv` = ‘N’,
`Alter_priv` = ‘N’,
`Show_db_priv` = ‘N’,
`Super_priv` = ‘N’,
`Create_tmp_table_priv` = ‘N’,
`Lock_tables_priv` = ‘N’,
`Execute_priv` = ‘N’,
`Repl_slave_priv` = ‘N’,
`Repl_client_priv` = ‘N’,
`Create_view_priv` = ‘N’,
`Show_view_priv` = ‘N’,
`Create_routine_priv` = ‘N’,
`Alter_routine_priv` = ‘N’,
`Create_user_priv` = ‘N’
Where CONVERT( `user`.`Host` USING utf8 ) = CAST( 0×25 AS BINARY )
AND CONVERT( `user`.`User` USING utf8 ) = CAST( 0×7465737475736572 AS BINARY ) LIMIT 1 ;
[/sql]
【0×25是%的编码,0×7465737475736572 是testuser的编码】