Home > database >  Redhat6.5 mysql5.7 database installation
Redhat6.5 mysql5.7 database installation

Time:09-24

Operating system environment 1
Linux version: Linux RedHat6.5
Partition requirements:
/100 g
/home 300 ~ 500 g
Swap the 32 gb
1 g/boot
The/boot/EFI 1 g
/ebig not less than 500 g, must be the mount drive equipment

The backup machine:
Hard disk capacity: 2 t
MySQL data backup path/mysqlbak

MySQL:
Version 5.7.14
The Linux username mysql
Linux users group mysql
Linux password ebigmysql
The installation path/ebig/mysql
Data file path/ebig/mysql/data
Connect the path to the file/TMP/mysql. The sock
The error log file path/ebig/mysql/data/mysqld. Log
Port 13306 (visual reality changes)
The MySQL database administrator username root
The MySQL database administrator password ebigroot (visual reality changes)
MySQL database (SPD) user username SPD
MySQL database (SPD) user password ebigspd (visual reality changes)
MySQL download address: http://pan.baidu.com/s/1dFtNHQx password: bbiu
Built before you install the mysql user and group
Installation steps 2
First the MySQL installation package uploaded to the directory/ebig
Using the root user login system, enter the ebig directory

Unpack the MySQL installation package

The unzipped directory name not mysql

Reproduction support - mysql under files. Server file copy to/etc/init. D

Create a data directory and TMP directory

Create my. CNF file

Copies of the following to my. CNF in

Create a soft link

Modify/etc/init. D/mysqld

Change the file the basedir and datadir to

Run a MySQL installation command

After the installation is complete, will ebig/mysql/directory. And my CNF owner is modified to mysql

Added to the system startup, MySQL will follow the system automatically start

Modify/etc/my CNF file, remove the skip - grant - the "#" in front of the tables, set the MySQL into don't need a password and can be found at

Start the MySQL

Log in to update the MySQL root password

Execute the following command to change the password

Modify/etc/my CNF file, add back the skip - grant - the "#" in front of the tables or the entire line to delete it,
Restart the MySQL

Log in MySQL

Enter the password, run the following command to create the SPD user

It is the end of
the MySQL installationThe permissions for a user to specify a database;
GRANT, the SELECT, INSERT, UPDATE, REFERENCES, DELETE, CREATE, DROP, ALTER, INDEX, the CREATE VIEW, SHOW VIEW ON ` SPD - nn `. * 'spdnnsy' @ '%'),
Grant select, create, drop, update, alter on the SPD - nn. * to 'spdnnsy' @ 'localhost' identified by 'ebigspdnnsy with grant option;
Grant all privileges on ` SPD - nn `. * to 'spdnnsy' @ '%' identified by 'ebigspdnnsy';

CodePudding user response:

1, wget download - https://dev.mysql.com/get/mysql57-community-release-el7-9.noarch.rpm
2, extract the installation - sudo RPM - the ivh mysql57 - community - release - el7-9. Noarch. RPM
3, install the mysql server - sudo yum install mysql server
-4, restart mysql - sudo systemctl restart mysqld
5, temporary password - sudo access mysql grep 'temporary password'/var/log/mysqld log
A temporary password generated for root @ localhost: mqRfBU_3Xk & gt; R
6, safe mode change passwords - sudo mysql_secure_installation
7, test mysql

CodePudding user response:

Thanks for sharing, it is recommended that the blog
  • Related