天道酬勤

RDBMS and My Life

Archive for the ‘LAMP’ Category

设置MySQL远程连接的方法

leave a comment

Mysql数据库默认情况下是不允许远程连接的,若需要远程连接,请尝试下面的方法。

首先登录到MySQL服务器,

shell#mysql -u username -ppassword -h hostname databasename

注意,这里-p与password之间没有空格。

然后执行下面的命令,

mysql>grant all on *.* to ‘remote’@’172.16.21.39′ identified by ‘password’;

即以remote用户和password指定的密码进入mysql db
如果要设置为任何客户端都可以以root连接的话,可以这么写:

mysql>grant all on *.* to ‘root’@'%’ identifiied by ‘root’s pw’;

Written by ochef

March 2nd, 2009 at 9:30 am

Posted in LAMP

Tagged with

rrdtools 安装

leave a comment

近一个星期在家用nagios做oracle的监控实验,在安装rrdtools的时候遇到了问题,研究了很久都没有解决,后来得到了Linux&Unix进阶 群里 ——武林41005570的莫大的帮助,在此表示感谢!

这里把安装的过程简单的写一下,为后人参考,避免少走弯路。

在安装前检查系统是否安装了tcl、pango-devel相关的包

1
2
shell#rpm –qa|grep tcl*
shell#rpm –qa|grep pango-devel

在安装rrdtool时需要cairo包的支持,而cairo又需要pkg-config、glib、pixman、pang、freetype、fontconfig包的支持

安装的顺序是:
1. pkg-config

1
2
3
shell#./configure --prefix=/usr
shell#make
shell#make install

后面5个包采用上面相同的方法安装

Read the rest of this entry »

Written by ochef

March 1st, 2009 at 4:08 am

Posted in LAMP