yum list installed mysql* rpm -qa | grep mysql*查看是否有安装包:
yum list mysql*安装mysql客户端:
yum install mysql安装mysql 服务器端:
yum install mysql-server yum install mysql-devel
service mysqld start或者/etc/init.d/mysqld start
chkconfig -add mysqld
查看开机启动设置是否成功
chkconfig --list | grep mysql*mysqld 0:关闭 1:关闭 2:启用 3:启用 4:启用 5:启用 6:关闭
service mysqld stop
mysqladmin -u root password 666666登录:
service mysqld stop mysqld_safe --user=root --skip-grant-tables mysql -u root use mysql update user set password=password("666666") where user="root"; flush privileges;
use mysql; UPDATE user SET `Host` = '%' WHERE `User` = 'root' LIMIT 1;%表示允许所有的ip访问
原文地址:http://blog.csdn.net/tjcyjd/article/details/41659761