centos 7下安装mysql
1.去mysql官方网站查询最新的版本:

yum localinstall mysql57-community-release-el7-9.noarch.rpm
yum repolist enabled







grep 'temporary password' /var/log/mysqld.log;
set password for 'root'@'localhost'=password('123456');

Database changed
mysql> grant all privileges on *.* to 'root'@'%' identified by '123456'
    -> ;
Query OK, 0 rows affected, 1 warning (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
   
开机启动
shell> systemctl enable mysqld
shell> systemctl daemon-reload
UTF-8问题;
1.
vim /etc/my.cnf


配置文件:
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
character-set-server=utf8
innodb_flush_log_at_trx_commit=0
interactive_timeout=31536000
wait_timeout=31536000
default-time_zone='+8:00' 
posted on 2017-02-23 16:20 maomingchao 阅读(143) 评论(0) 收藏 举报
 
                    
                     
                    
                 
                    
                 
                
            
         
 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号