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

How to install MySQL binary

2025-04-13 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly shows you "how to install MySQL binary", the content is easy to understand, clear, hope to help you solve your doubts, let the editor lead you to study and learn "how to install MySQL binary" this article.

MySQL binary installation method: 1, download the binary package; 2, mount the new logical volume to "/ data"; 3, extract to the installation directory and view the built-in installation information; 4, set the configuration file; 5, specify the database; 6, service startup script; 7, carry out security initialization.

The operating environment of this tutorial: CentOS 7 system, mysql 8 version, Dell G3 computer.

MySQL binary installation

Planning

1. Download the binary package

Https://downloads.mariadb.org/mariadb/10.2.16/

2. Clean logical volume lvm

3. Mount the new logical volume to / data

4. / data/mysql directory stores the database

5. Extract to the installation directory and view the built-in installation information

6. Set the configuration file

7. Specify the database

8. Service startup script

9. Security initialization

Create a new LVM partition

1. Create a new logical volume and set the space

Fdisk / dev/sda#

2. New logical volume type

3. The new zone will take effect.

Partprobe # #

4. Create volume groups, logical volumes, and physical volumes

5. Mounting

Vim / etc/fstab##

Mysql installation Settings

1. Create mysql account information

Useradd-r-s / sbin/nologin-d / data/mysql-m mysql##

2. Decompress the mysql binary file

Note: must be decompressed to / usr/local directory

3. Create a mysql soft connection

4. Modify all permissions under the mysql directory

5. Put the execution file bin into the $PATH global variable

Vim / etc/profile.d/mysql.sh##

Let the settings take effect

. / etc/profile.d/mysql.sh##

6. Generate database files

Scripts/mysql_install_db-datadir=/data/mysql-user=mysql##

7. Edit the mysql configuration file

Note: the copy configuration template on the picture overwrites the original file, and different template files are selected according to the environment.

Vim / etc/my.cnf##

Note: note that the database path here must be the same as the path specified above to store the database files

Startup file

1. Put the mysql startup file into init.d

2. Add to the startup list

2. Start the service

Service mysqld start##

Note: if startup fails, check permissions and paths

To this mysql is possible to log in, but now any user can log in without password verification, this is too insecure, the following simple reinforcement

Secure reinforcement of mysql_secure_installation##

Result

Specify root user-p to enter a password to log in [recommended study: mysql video tutorial]

The above is all the contents of the article "how to install MySQL binaries". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

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