When installing Ambari, ambari default database is Prostgresql, Prostgresql is not familiar, choose to use MySQL. CentOS 7, however, supports the MARIADB database by default. MARIADB is a branch of MySQL that is maintained primarily by the open source community. During the installation process, remove the CENTOS7 default installed MARIADB database before reinstalling MySQL.
Installation steps:
- Software download (MySQL RPM package has many files, only need to install server and Client)
- Database installation
- User Rights configuration
- installation directory and Features
- Commonly used to create user methods
Install the Software:
- mysql-client-advanced-5.6.22-1.el7.x86_64.rpm
- mysql-server-advanced-5.6.22-1.el7.x86_64.rpm
- Command: Yum install-y perl-module-install.noarch (Troubleshooting MySQL server installation exception)
- Command: RPM-IVH mysql-server-advanced-5.6.22-1.el7.x86_64.rpm (Installation MySQLServer)
- Command: RPM-IVH mysql-client-advanced-5.6.22-1.el7.x86_64.rpm (Installation mysqlclient)
- Command: Service MySQL start (start MySQL prompt sucess, OK)
- Starting MySQL If the service is started . error! The server quit without updating PID file (/var/lib/mysql/hdp1.pid), follow the steps below.
- Command: RM-RF/USR/MY.CNF (restart reboot after deletion, re-execute the above start service command, prompt sucess, OK)
User Rights configuration:
Execute Sql:use MySQL
Execute sql:update User set Password=password (' 123456 ') where user= ' root ';
Execute sql:select host,user,password from user;
Execution: Flush privileges; (Refresh permissions)
Input: Quit; (Exit the MySQL client and return to the Linux command line)
Command: Service mysql restart (restart MySQL service)
Command: Mysql-u root-p (for MySQL command line)
Execute: GRANT all privileges on * * to ' root ' @ '% ' identified by ' 123456a? ' With GRANT OPTION; (Allow all IP remote access to MySQL)
Execution: Flush privileges; (Refresh permissions)
Execution: Quit;
Command: Service mysql restart (restart MySQL service, MySQL installation complete)
Ambari Installation Configuration MySql