linux下使用yum安装mysql

# yum install bzip2 bzip2-devel 
# yum install mysql
# yum install mysql-server  
# yum install mysql-devel  
# vim /etc/my.cnf  
  #set default-character-set=utf8  
# chkconfig --add mysqld  
# service mysqld start  
# service mysqld stop  
# mysqladmin -u root password 密码   
# mysql -u root;  
> use mysql ;  
> update user set password=password("密码") where user="root";  
> flush privileges;   
> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '密码' WITH GRANT OPTION;  

 

您还没有登录,请先 登录或者 注册后,添加评论