I have been using MySQL recently. The article mysql-installation under Linux wrote about using other methods to install MySQL. This time I mainly used the rpm format to install it. After trying it, I felt that this installation mode was simpler. Uninstall MariaDB CentOS7 installs MariaDB instead of MySQL by default. There may be a conflict between MariaDB database and MySQL, so uninstall MariaDB first. 1. Check the installed MariaDB related packages Download mysql rpm package Below is the download address of the official website: Install mysql using rpm The following steps require root privileges. There are dependencies between packages, so the rpm commands must be executed in sequence. mkdir mysql tar -xv -f mysql-5.7.18-1.el7.x86_64.rpm-bundle.tar -C mysql cd mysql rpm -ivh mysql-community-common-5.7.18-1.el7.x86_64.rpm rpm -ivh mysql-community-libs-5.7.18-1.el7.x86_64.rpm rpm -ivh mysql-community-client-5.7.18-1.el7.x86_64.rpm rpm -ivh mysql-community-server-5.7.18-1.el7.x86_64.rpm Problems: 1) libaio.so.1()(64bit) is needed by MySQL-server Solution: Install libaio-0.3.107-10.el6.x86_64.rpm ①Download address: http://mirror.centos.org/centos/6/os/x86_64/Packages/libaio-0.3.107-10.el6.x86_64.rpm ②Execute: rpm -ivh libaio-0.3.107-10.el6.x86_64.rpm 2) net-tools is needed Solution: yum install net-tools 3) perl (Getopt::Long) is needed by mysql-community-server-5.7.18-1.el7.x86_64 Solution: yum install perl After successful installation, delete the installation files and temporary files, or you can choose not to delete them. Log in to mysql and change the initial password The following steps require root privileges. vi /etc.my.cnf skip-grant-tables 2. Change the user and group of the MySQL database directory, and then start mysql chown -R mysql:mysql /var/lib/mysql/ systemctl start mysqld.service //Start the mysql database service 3. Login mysql -uroot -p 4. Change password use mysql; update user set authentication_string =password('your own password') where host ='localhost' and user='mysql'; quit; 5. Log in again using your password mysql -uroot -p The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Summary of nginx configuration location method
>>: Detailed explanation of Nginx static service configuration (root and alias instructions)
1. Percentage basis for element width/height/padd...
Overview: Oracle scott user has four tables, whic...
Table of contents Overview 1. Simple Example 1. U...
Windows cmd telnet format: telnet ip port case: t...
A set of projects for training react+ts Although ...
Table of contents 1. Pull the image 1.1 Pull the ...
This article uses the deep learning framework ker...
Today I was asked what the zoom attribute in CSS ...
This article example shares the specific code of ...
Several parts of Compose deal with environment va...
MySQL versions are divided into Enterprise Editio...
Table of contents 1. Get to know Teleport 2. Basi...
The test is passed in the nodejs environment. The...
Async Hooks is a new feature of Node8. It provide...
drop table Drop directly deletes table informatio...