CentOS MySQL8.0 설치

1083 단어 springmysql
 rpm -Uvh https://repo.mysql.com/mysql80-community-release-el7-3.noarch.rpm
yum --enablerepo=mysql80-community install mysql-community-server
  Mysql  
systemctl start  mysqld.service
mysql    
systemctl status mysqld.service
      
 grep "password" /var/log/mysqld.lo
//  
mysql -u root -p

 
  root    
ALTER USER 'root'@'localhost' IDENTIFIED BY '  '

원격 액세스 제한 해결 방법
           
mysql> use mysql;
##              ,          
mysql> select host,user from user where user='root';
mysql> update user set host='%' where user='root'; 
mysql> flush privileges
           
mysql> CREATE USER 'root'@'%' IDENTIFIED BY 'root';
##      GRANT ALL PRIVILEGES ON   .   TO '   '@'IP  ' WITH GRANT OPTION
mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' WITH GRANT OPTION;
mysql> FLUSH PRIVILEGES;

좋은 웹페이지 즐겨찾기