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訪問