The current MySQL website installation tutorial indicates that you can use the Yum method.
MySQL YUM Repository
MySQL Yum library provides rpm installation packages for MySQL clients, servers, and related components
The library can also upgrade and replace third-party MySQL installed (from Linux native software sources), if any
Supported Linux platforms:
- EL5,EL6,EL7-based Linux platforms, such as the associated version of Red Hat,centos,oracle Linux
- Fedora 20
View Linux version, download the corresponding version of MySQL Yum Library
[root@localhost ~]# uname -r3.10.0-123.el7.x86_64
Open URL, http://dev.mysql.com/downloads/repo/yum/
Determine the Linux version corresponding to the MySQL Yum library
Download using wget
Install MySQL Yum Repository
[root@localhost ~]# rpm -Uvh platform-and-version-specific-package-name.rpm
Set up MySQL Yum Repository
Modify the file/etc/yum.repos.d/mysql-community.repo to determine the MySQL version used
# Enable to use MySQL 5.6[mysql56-community]name=MySQL 5.6 Community Serverbaseurl=//repo.mysql.com/yum/mysql-5.6-community/el/5/$basearch/enabled=1gpgcheck=1gpgkey=file:/etc/pki/rpm-gpg/RPM-GPG-KEY-mysql
Each MySQL version of the above content has
To use this version of MySQL, set enable to 1
Note that the other versions are set to 0
Once setup is complete, use the following command to view the MySQL version used
| grep mysql
Installing MySQL Server
install mysql-community-server
Start MySQL
Start
service mysqld start
View status
service mysqld status
Stop it
service mysqld stop
To set the root user password
After installation, the Superuser does not have a password
This causes anyone to log on to MySQL as long as it is on the local computer
Set the password for security reasons
[[email protected] ~]# mysql -u rootmysql> SET PASSWORD FOR ‘root‘@‘localhost‘ = PASSWORD(‘newpwd‘);mysql> SET PASSWORD FOR ‘root‘@‘127.0.0.1‘ = PASSWORD(‘newpwd‘);mysql> SET PASSWORD FOR ‘root‘@‘::1‘ = PASSWORD(‘newpwd‘);mysql> SET PASSWORD FOR ‘root‘@‘host_name‘ = PASSWORD(‘newpwd‘);
Or
shell> mysql -u rootmysql> UPDATE mysql.user SET Password = PASSWORD(‘newpwd‘) WHERE User = ‘root‘;mysql> FLUSH PRIVILEGES;
View MySQL password settings
User,Host, Password FROM mysql.user;
For more user permission settings see: http://dev.mysql.com/doc/refman/5.6/en/default-privileges.html
Reference
MySQL 5.6 version, installing MySQL on Linux Using the MySQL Yum Repository
Apply MySQL (installed in Linux)