首页 > mysql, 数据库 > CentOS安装MySql

CentOS安装MySql

2015年3月23日 939 views

1.rpm -qa|grep -i mysql
2.
service mysql stop
/etc/init.d/mysql shutdown
service mysqld stop
/etc/init.d/mysqld shutdown
3.rpm -ev MySQL-client-5.5.25a-1.rhel5
rpm -e –nodeps MySQL-server-5.5.25a-1.rhel5 (-nodeps强制删)
4.find / -name mysql
rm -rf /var/lib/mysql
rm -rf /usr/lib64/mysql 等
rm -rf /etc/my.cnf
5.rpm -qa|grep -i mysql
6.yum list | grep mysql
7.yum install mysql
8.yum install mysql-server
9.rpm -qi mysql-server
10./etc/init.d/mysqld start 等
11.mysql [-uroot -p]
12.select user();
13.show grants for root@localhost;
14.update user set password=password(’123′) where user=’root’;
15.FLUSH PRIVILEGES;
16.GRANT ALL PRIVILEGES ON db.* TO ‘user_name’@'%’ IDENTIFIED BY ‘abc’ WITH GRANT OPTION;

分类: mysql, 数据库 标签:
  1. 本文目前尚无任何评论.
  1. 本文目前尚无任何 trackbacks 和 pingbacks.