About centOS installation configuration that something mysql5.6

The first step to download and install

First, because now the main mysql official website yum Direct Push mysql8, mysql5.1, however mysql8 unstable, mysql5.1 version is too low, in order to use the old version 5.6 will first download the dependencies, install dependencies, change the default after the version number, then install. It is summarized by the official website to download dependencies + yum installed manner.

1.yum list | grep mysql

2.https: //dev.mysql.com/downloads/repo/yum download dependencies

3.rpm -ivh dependencies   

Note: The installation and mounting rpm exe dependencies on the windows, as will be automatically installed to the appropriate directory, do not specify the installation directory (e.g., / opt)

4.yum repolist enabled | grep ".. Mysql * - community *" query mysql installation of dependencies

5.vi /etc/yum.repos.d/mysql-community.repo mysql5.6 change the default version number corresponding to enabled = 1 mysql8 corresponding enable = 0

6. change mysql 5.6 enable = 1 change mysql8 enable = 0 modify the configuration file specific software version

7.yum install mysql-server

Note: If the error re-run yum install mysql-server

8. Enter centOs system database Mysql, this time with even nevicat centos database will be reported in the 2003 error

Solution: Go to centos system database mysql -u root -p as root

9. privileges granted to other remotely connected to the computer:

. mysql> GRANT ALL PRIVILEGES ON * * TO 'root' @ '%' IDENTIFIED BY '123456' WITH GRANT OPTION;
wherein '123456' is reset root password

10. If this time with nevicat even centos in 2003 database or to report errors

Solution: Turn off the firewall service iptables stop will be a successful connection, you can contact me if unsuccessful

Step Configuration Command Summary

1. Modify mysql root password mysqladmin -u root password 'new-password'

2. Check mysql process is started: ps -ef | grep -i "mysqld"

3. Modify the mysql root user remote launch permissions

  Act One: by changing the user table

    use mysql;

    select user,host from user;

    Note: If you just modify that record called the virtual machine host name (the host to%) will lead Rom (reported 1045 errors), so in this case need to complete to add a user to root when a remote terminal connection, host after% for the full information of the refresh permission

  Act II: The command

    GRANT ALL PRIVILEGES ON *.*TO'root'@'%'IDENTIFIED BY '123456' WITH GRANT OPTION;

    flush privileges to refresh the permissions table or restart the mysql service mysqld start

    quit

4. Check whether mysql has been installed: rpm -qa | grep -i "mysql"

5. Start mysql: chkconfig mysqld on

      service mysqld start

6. Log in as root: mysql -u root -p

        mysql -u root password "password"

 

Guess you like

Origin www.cnblogs.com/leorichardyhl/p/11329985.html