How to perform binary installation on CentOS 6.9 mariadb 5.5.57

Source: Internet
Author: User

1. Check to see if MySQL is installed: Rpm-qa mysql*

650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M00/08/65/wKiom1ngps7yWaAJAAAXXLqueVs475.png "title=" Picture 1.png "alt=" Wkiom1ngps7ywaajaaaxxlquevs475.png "/>

(There is only one library file, stating that MySQL is not installed)

2. See if there is a MySQL user: getent passwd mysql

If not, create: useradd-d/app/mysqldb-r-m-s/sbin/nologin MySQL

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M02/08/66/wKiom1ngpt6xVzFVAAAj394cJbU481.png "title=" Picture 2.png "alt=" Wkiom1ngpt6xvzfvaaaj394cjbu481.png "/>

3. Unzip the MARIADB package: Tar xvf mariadb-5-5-57 -linux-x86_64.tar.gz-c/usr/local

(Note: Because it is a binary installation, the description has been compiled, the installation directory must be placed under/usr/local/)

4. Create a soft link:

cd/usr/local/;

Ln-s Mariadb-5.5.57-linux-x86_64/mysql

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M01/A7/1C/wKioL1ngqi6hfLLyAABnarvIvbo415.png "title=" Picture 3.png "alt=" Wkiol1ngqi6hfllyaabnarvivbo415.png "/>5. Into the/usr/local/mysql/directory:cd/usr/local/mysql/;

Create/etc/mysql/directory: mkdir/etc/mysql/;

Copying files support-files/my-huge.cnf to/etc/mysql: CP support-files/my-huge.cnf/etc/mysql/my.cnf

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M02/A7/1C/wKioL1ngq5XxM37dAAB93mHK2CE768.png "title=" Picture 5.png "alt=" Wkiol1ngq5xxm37daab93mhk2ce768.png "/>

6. Edit the copied file: Vim/etc/mysql/my.cnf

650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M00/A7/1C/wKioL1ngq6WzfX56AABX0oS8sjY781.png "title=" Picture 6.png "alt=" Wkiol1ngq6wzfx56aabx0os8sjy781.png "/>

7.pwd; see if the working directory is under/usr/local/mysql

(If not this directory, execute Cd/usr/local/mysql)

scripts/mysql_install_db--user=mysql--datadir=/app/mysqldb

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M00/08/66/wKiom1ngrmfiQoQkAACJGzri7TM244.png "title=" Picture 7.png "alt=" Wkiom1ngrmfiqoqkaacjgzri7tm244.png "/>

8. Copy the mysql.server file and rename it to mysqld:

CP Support-files/mysql.server/etc/init.d/mysqld

See if there are any mysqld services: chkconfig--list mysqld

No add: Chkconfig--add mysqld

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M00/08/66/wKiom1ngroPBU_MxAAC3E6_deJU687.png "title=" Picture 8.png "alt=" Wkiom1ngropbu_mxaac3e6_deju687.png "/>

9. Start mysqld Services: Service mysqld start

650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M00/A7/1C/wKioL1ngq9nSTFQRAABf62TzRl0328.png "title=" Picture 9.png "alt=" Wkiol1ngq9nstfqraabf62tzrl0328.png "/>

10. Create log directory: MKDIR/VAR/LOG/MARIADB;

Create log file: touch/var/log/mariadb/ Mysqld.log ;

Modify permissions: Chown Mysql/var/log/mariadb/mysqld.log;

Start Services: Service mysqld start;

650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M01/08/66/wKiom1ngrp7iYRPFAABKkXyyuYE661.png "title=" Picture 10.png "alt=" Wkiom1ngrp7iyrpfaabkkxyyuye661.png "/>

650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M01/08/66/wKiom1ngr73Qixd6AAAY0_bgpiE187.png "title=" 4.png "alt=" Wkiom1ngr73qixd6aaay0_bgpie187.png "/>

11. Edit the path file: vim/etc/profile.d/mysql.sh

650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M01/A7/1C/wKioL1ngq_byqxB6AAAeVKeDIMM566.png "title=" Picture 11.png "alt=" Wkiol1ngq_byqxb6aaaevkedimm566.png "/>

12. Effective configuration file mysql.sh:. /etc/profile.d/mysql.sh

13. Initialize Mysql:mysql_secure_installation

The entire process is complete, the MARIADB package is installed, then you can log in for testing, the command is: mysql-uroot-p****** (****** refers to the password you set when initializing MySQL).

This article is from the "Mylog" blog, make sure to keep this source http://600600880.blog.51cto.com/13303875/1972229

How to perform binary installation on CentOS 6.9 mariadb 5.5.57

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.