CentOS-64位安装mysql5.7
生活随笔
收集整理的這篇文章主要介紹了
CentOS-64位安装mysql5.7
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1.前言
因為直接使用yum install默認安裝的版本是5.1,查閱官網后使用Yum Repository安裝mysql5.7,這里下載的版本是mysql57-community-release-el6-11.noarch.rpm。
2.安裝
1)添加yum repository
[root@localhost opt]# sudo yum localinstall mysql57-community-release-el6-11.noarch.rpm[root@localhost opt]# yum repolist enabled | grep "mysql.*-community.*"
2)安裝mysql
1 [root@localhost /]# sudo yum install mysql-community-server3)啟動mysql及查看服務
1 [root@localhost /]# service mysqld start 2 Initializing MySQL database: [ OK ] 3 Installing validate password plugin: [ OK ] 4 Starting mysqld: [ OK ] 5 [root@localhost /]# sudo service mysqld status 6 mysqld (pid 42363) is running...4)修改密碼
因mysql有默認密碼,先生成臨時密碼,登錄mysql后再修改密碼。
1 [root@localhost /]# sudo grep 'temporary password' /var/log/mysqld.log 2 2017-06-27T15:19:54.431342Z 1 [Note] A temporary password is generated for root@localhost: InA1Mppj%R1K登錄mysql
1 [root@localhost /]# mysql -uroot -p 2 Enter password:設置密碼,mysql密碼要求大、小寫、數字、特殊字符各一個且長度不能低于八位。
1 Welcome to the MySQL monitor. Commands end with ; or \g. 2 Your MySQL connection id is 4 3 Server version: 5.7.18 4 5 Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. 6 7 Oracle is a registered trademark of Oracle Corporation and/or its 8 affiliates. Other names may be trademarks of their respective 9 owners. 10 11 Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. 12 13 mysql> alter user 'root'@'localhost' identified by 'yourpassword'; 14 Query OK, 0 rows affected (0.01 sec)參考資料:
https://dev.mysql.com/doc/refman/5.7/en/linux-installation-yum-repo.html
https://dev.mysql.com/doc/refman/5.7/en/validate-password-plugin.html
?
轉載于:https://www.cnblogs.com/floay/p/7085882.html
總結
以上是生活随笔為你收集整理的CentOS-64位安装mysql5.7的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: VS2015--win32project
- 下一篇: H3 BPM微信接入配置