How to install and configure the decompressed version of MySQL database under Linux system

How to install and configure the decompressed version of MySQL database under Linux system

1. Unzip the file to the current directory

Command: tar -zxvf mysql....tar.gz

2. Move the unzipped folder to the target directory and rename it mysql

Command: mv mysql-version number/usr/local/mysql

Add the system mysql group and mysql user

Add the system mysql group

sudo groupadd mysql

Add mysql user

sudo useradd -r -g mysql mysql

After adding, you can view the available ID in mysql

Then enter the /usr/local/mysql directory

Set the mysql user group's permissions to operate the folder

Command: chown -R mysql:mysql ./

Check if /etc/my.cnf exists, if so delete it

View command: ls /etc/my.cnf

Delete command: rm /etc/my.cnf

Initialize the database

Command: ./scripts/mysql_install_db --user=mysql

Note: If you execute this command, the following error is reported

Need to install yum package

Command: yum -y install perl perl-devel

After the installation is complete, re-execute the initialization database command

Then go to the support-files folder

Copy my-default.cnf to /etc and rename it to my.cnf

Command: cp my-default.cnf /etc/my.cnf

Copy the startup file mysql.server to /etc/rc.d/init.d and rename it to mysql

Command: cp mysql.server /etc/rc.d/init.d/mysql

Then configure mysql to start automatically

Enter the /etc/init.d directory

Give mysql executable permissions

Command: chmod +x mysql

Adding Services

Command: chkconfig --add mysql

View Service List

Command: chkconfig --list

If you see the mysql service and 3, 4, and 5 are all on, then it is successful. If they are off, type

chkconfig --level 345 mysql on

Restart your computer

Check the monitor to see if the service is started

Command: netstat -na |grep 3306

Change the user's ability to remotely operate the database

Authorization Operation

Command: grant all privileges on *.* to '%'@'%' identified by 'mypassword' with grant option;

Refresh Authorization

flush privileges;

remote connection

Deleting other users

Summarize

The above is the editor's introduction to the installation and configuration of the unzipped version of MySQL database under the Linux system. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!

You may also be interested in:
  • Detailed tutorial on installing Mysql5.7.19 on Centos7 under Linux
  • MySQL 5.7.19 (tar.gz) installation graphic tutorial under Linux
  • MySQL 5.6.27 Installation Tutorial under Linux
  • MySQL 8.0 installation tutorial under Linux
  • Detailed steps to install MySql 5.7.21 in Linux
  • Installation tutorial of MySQL 5.1 and 5.7 under Linux
  • Detailed tutorial for installing MySQL on Linux
  • MySQL 5.7 installation and configuration tutorial under Linux virtual machine
  • Detailed steps to install MySQL 5.6 X64 version under Linux

<<:  A detailed discussion of evaluation strategies in JavaScript

>>:  Solve the problem that VMWare cannot display in full screen after installing Mac system

Recommend

Detailed explanation of the this pointing problem in JavaScript

Summarize Global environment ➡️ window Normal fun...

JS realizes the effect of picture waterfall flow

This article shares the specific code of JS to re...

20 Signposts on the Road to Becoming an Excellent UI (User Interface) Designer

Introduction: Interface designer Joshua Porter pub...

W3C Tutorial (14): W3C RDF and OWL Activities

RDF and OWL are two important semantic web techno...

A brief discussion on MySQL index optimization analysis

Why are the SQL queries you write slow? Why do th...

CSS example code for setting scroll bar style

The CSS implementation code for setting the scrol...

MySQL learning notes: data engine

View the engines supported by the current databas...

Basic installation process of mysql5.7.19 under winx64 (details)

1. Download https://dev.mysql.com/downloads/mysql...

Detailed explanation of the difference between $router and $route in Vue

We usually use routing in vue projects, and vue-r...

React's component collaborative use implementation

Table of contents Nesting Parent-child component ...

Div adaptive height automatically fills the remaining height

Scenario 1: Html: <div class="outer"...

How to implement responsiveness in Vue source code learning

Table of contents Preface 1. Key Elements of a Re...

VM VirtualBox virtual machine mount shared folder

One environment Install VMware Tools on CentOS 7 ...