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)
The installation process is omitted (I installed ...
Table of contents 1. Original demand 2. Solution ...
<meta name="viewport" content="w...
No more nonsense, post code HTML part <div cla...
The Drag and Drop API adds draggable elements to ...
Scenario The company project is deployed in Docke...
Table of contents 1. Component Registration 2. Us...
When we are writing a page, we often encounter a ...
Table of contents vue2.x vue3.x tiny-emitter plug...
“Inputs should be divided into logical groups so ...
After the user logs out, if the back button on the...
In the previous article, we talked about MySQL tr...
Sometimes the input box is small, and you want to...
Preface Recently connected to mysql /usr/local/my...
There are two tables, and the records in table A ...