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

MySQL 5.7.28 source code installation

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

Share

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

MySQL 5.7.28 source code installation 1. Introduction:

In addition to the Oracle commercial version of the database, MySQL is an open source RDBMS database software with the highest usage on the market, using the GPL open source protocol, you can modify the MySQL source code to develop your own system. It is also managed through the most commonly used SQL statements

MySQL is usually installed in the following three ways:

L online Yum installation

L offline rpm installation

L source code compilation and installation

Second, clean up the environment before installation:

The first two installation methods are very simple, but all installation methods need to follow the following pre-installation steps:

1) check whether there is a running MySQL process [root@open_source ~] # ps-ef | grep mysql | grep-v grep2) check whether there is a running MySQL service

Before 6.x

[root@open_source ~] # chkconfig-- list | grep mysql

After 7.x

[root@open_source ~] # ls-rtl / etc/init.d/mysqld [root@open_source ~] # systemctl status mysql3) check and delete whether the system comes with Mysql or MariaDB [root @ open_source ~] # rpm-qa MySQL [root @ open_source ~] # rpm-qa mariadb 3. Download MySQL software:

Https://downloads.mysql.com/archives/community/

Start installation 4.1 Environment preparation

L install the libaio-devel dependency package

[root@open_source ~] # yum install-y libaio-devel4.2 create users and directories

L create user

[root@open_source ~] # useradd-g mysql mysql

L create a directory

[root@open_source ~] # mkdir / mysql/3306/data

L empower

[root@open_source] # chown-R mysql.mysql / mysql

4.3 start installation

L decompression software

[root@open_source ~] # cd / usr/local/ [root @ open_source local] # tar zxf mysql-5.7.28-linux-glibc2.12-x86_64.tar.gz

Create a soft connection and empower it

[root@open_source local] # ln-s mysql-5.7.28-linux-glibc2.12-x86_64 MySQL [root @ open_source local] # chown-R mysql.mysql mysql/

L configure environment variables

[root@open_source local] # echo "export PATH=/usr/local/mysql/bin:$PATH" / etc/ profile [root @ open_source local] # source / etc/profile

L initialize the database

[root@open_source local] # mysqld-initialize-insecure-user=mysql-basedir=/usr/local/mysql-datadir=/mysql/3306/data/

L configure the My.cnf file

Cat > / etc/my.cnf = 8MEDIUM Length > = 8, numeric, mixed case, and special charactersSTRONG Length > = 8, numeric, mixed case, special characters and dictionary file Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 0Please set the password for root here. New password: Re-enter new password: Estimated strength of the password: 50 Do you wish to continue with the password provided? (Press y | Y for Yes, any other key for No): yBy default, a MySQL installation has an anonymous user,allowing anyone to log into MySQL without having to havea user account created for them. This is intended only fortesting, and to make the installation go a bit smoother.You should remove them before moving into a productionenvironment. Remove anonymous users? (Press y | Y for Yes, any other key for No): ySuccess. Normally, root should only be allowed to connect from'localhost'. This ensures that someone cannot guess atthe root password from the network. Disallow root login remotely? (Press y | Y for Yes, any other key for No): ySuccess. By default, MySQL comes with a database named 'test' thatanyone can access. This is also intended only for testing,and should be removed before moving into a productionenvironment. Remove test database and access to it? (Press y | Y for Yes, any other key for No): y-Dropping test database...Success. -Removing privileges on test database...Success. Reloading the privilege tables will ensure that all changesmade so far will take effect immediately. Reload privilege tables now? (Press y | Y for Yes, any other key for No): ySuccess. All done!

L cannot log in directly after reinforcement

[root@open_source ~] # mysqlERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)

L View MySQL status

Mysql > mysql > show master status +-- + | File | Position | Binlog _ Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set | +-- -+ | mysql-bin.000009 | 3672 | ce8fc1bb-5fd6-11ea-869d-000c29eed638:1-20 | +- +-+ 1 row in set (0.00 sec) mysql > show databases +-+ | Database | +-+ | information_schema | | bindb | | gtdb | | mdp | | mysql | | performance_schema | | sys | | woo | +- -+ 8 rows in set (0.00 sec)

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