新聞中心
背景:VMware 安裝centos 7時,yum install mysql時默認安裝的mariadb,不是很習慣。

MariaDB數(shù)據(jù)庫管理系統(tǒng)是MySQL的一個分支,主要由開源社區(qū)在維護,采用GPL授權許可 MariaDB的目的是完全兼容MySQL,包括API和命令行,使之能輕松成為MySQL的代替品。
正確安裝mysql的方法:
眾所周知,Linux系統(tǒng)自帶的repo是不會自動更新每個軟件的最新版本(基本都是比較靠后的穩(wěn)定版),所以無法通過yum方式安裝MySQL的高級版本。所以我們需要先安裝帶有當前可用的mysql5系列社區(qū)版資源的rpm包。
從上面的列表可以看出, mysql56-community/x86_64 和 MySQL 5.6 Community Server 可以使用。因此,我們就可以直接用yum方式安裝了MySQL5.6版本了。
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
SERVERS IN PRODUCTION USE! PLEASE READ EACH STEP CAREFULLY!In order to log into MySQL to secure it, we'll need the current
password for the root user. If you've just installed MySQL, andyou haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.
Set root password? [Y/n] y [設置root用戶密碼]
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
... Success!
By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them. This is intended only for testing, and to make the installation
go a bit smoother. You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] y [刪除匿名用戶]
... Success!
Normally, root should only be allowed to connect from 'localhost'. This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] y [禁止root遠程登錄]
... Success!
By default, MySQL comes with a database named 'test' that anyone can
access. This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] y [刪除test數(shù)據(jù)庫]
- Dropping test database...
ERROR 1008 (HY000) at line 1: Can't drop database 'test'; database doesn't exist
... Failed! Not critical, keep moving...
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] y [刷新權限]
... Success!All done! If you've completed all of the above steps, your MySQL
installation should now be secure.
Thanks for using MySQL!
Cleaning up...
文章標題:CentOS7使用yum安裝MySQL5.6.24
網頁路徑:http://m.fisionsoft.com.cn/article/cogieec.html


咨詢
建站咨詢
