Rpm install MySQL Cluster

Installation mysql database
  a) to download the installation package mysql Source: wget http://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm

  b) mounting mysql Source: yum localinstall mysql57-community-release-el7-8.noarch.rpm

    If the end of the emergence of complete !, then the source MySQL installation is complete

   c) detecting whether the installation is complete: yum repolist enabled | grep "mysql * - community *.."

  

  d) Install mysql: yum install mysql-community-server

    If you appear at the end Complete !, MySQL installation is complete

 

  e) Setting ON start mysql service: systemctl enable mysqld

   f) View installed mysql version: rpm -aq | grep -i mysql

    

  g) Start MySQL service: systemctl restart mysqld

  h) Check MySQL initial password: grep 'A temporary password' /var/log/mysqld.log

    

  i) Change the MySQL password: mysqladmin -u root -p 'old password' password 'new password'

    

    Change the password problem here, change failed because the password is too simple reason. There are then two solutions:

    Method One: the password more complex (this is the most direct way)

    Method two: Close mysql password strength verified (validate_password)

        Edit the configuration file: vim /etc/my.cnf, increase the line validate_password = off

        After editing restart mysql service: systemctl restart mysqld

                          If you change the database port

                     vim /etc/my.cnf increase in line prot = 3306

                      After editing restart mysql service: systemctl restart mysqld

  j) set up remote access to mysql:

    Log into MySQL: mysql -uroot -p password

     Add a user gives access to:. Grant all privileges on the permissions set permissions to 'root' @ 'ip address' identified by 'password' with grant option; // ip can be changed %%, expressed Open All

    

    Refresh permissions: flush privileges;

Guess you like

Origin www.cnblogs.com/shenzhenhuaya/p/fyjgj.html