日期:2014-05-16 浏览次数:20652 次
# yum install mysql mysql-server wget http://mirrors.163.com/centos/5/os/i386/CentOS/mysql-server-5.0.77-4.el5_6.6.i386.rpm rpm -ivh mysql-server-5.0.77-4.el5_6.6.i386.rpm
vi /etc/sysconfig/iptables // 增加下面一行 -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT /sbin/service iptables restart
/sbin/chkconfig mysqld on /sbin/service mysqld start
mysqladmin version status
use mysql; UPDATE user SET password=PASSWORD("xxxx") WHERE user="root" /sbin/service mysqld restart
create database knet default charset utf8 collate utf8_general_ci;
grant all privileges on knet.* to 'admin'@'192.168.1.119' identified by 'admin'; use mysql; select host,user,password from user;
grant select,insert,update on knet.* to 'admin'@'%' identified by 'admin' user mysql; select * from user; select * from db;