Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Installation of mariadb 5.5Database binary package on centos6.5

2025-03-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

1 extract the binary package to / usr/local/, and rename it to mysql (the mariadb directory must be / usr/local/Mysql)

Tar-xf / var/ftp/pub/mariadb-5.5.56-linux-x86_64.tar.gz-C / usr/local

Mv / usr/local/mariadb-5.5.56-linux-x86_64 / usr/local/mysql

2 create Mysql as the system user with no home directory

Useradd-rMs / sbin/nologin mysql

3. Change all files in the directory from cd to / usr/local/mysql to mysql.

Cd / usr/local/mysql

Chown-R mysql:mysql.

4 execute the mysql initialization script, indicating the running user and database directory

Scripts/mysql_install_db-user=mysql-datadir=/usr/local/mysql/data

5 after completing [4], change all the file owners and groups in the / usr/local/mysql directory to root, and change the owners and groups of the data directory back to mysql.

Chown-R root.

Chown-R mysql data

6 create the / etc/mysql directory to place the directory as a configuration file, or you can directly place the configuration file in / etc/, without creating it. I deleted the default configuration file created by Mysql here, and copied a copy of the configuration from / usr/local/mysql/support-files/ to / etc/mysql/.

Mkdir / etc/mysql

Cp support-files/my-large.cnf / etc/mysql/my.cnf

Rm-f / etc/my.cnf

seven

Vim / etc/mysql/mysql

Add the following three items to the [mysqld] server configuration

Datadir = / usr/local/mysql/data

Innodb_file_per_table = on

Skip_name_resolve = on

8 copy the service script to init.d and set it to boot

Cp support-files/mysql.server / etc/init.d/mysql

Chkconfig-- add mysql & & chkconfig mysql on

9 start mysql, initialize security settings, turn off anonymous users, set root password, etc.

Service mysql start

Bin/mysql_secure_installation

It can be used normally now.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report