当前位置:网站首页>MySQL Linux Installation mysql-5.7.24
MySQL Linux Installation mysql-5.7.24
2022-06-12 05:09:00 【vihem】
MySQL And Linux install MySQL-5.7.24
Related to the environment
Linux: CentOS 7 64 position
Jdk: 1.8.0_231
MySQL: 5.7.24
Check before installation
Insist on whether it is installed mysql/mariadb
rpm -e mysql
rpm -qa | grep mysql
rpm -qa | grep mariadb
whereis mysql # see mysql Catalog
return error: package mysql is not installed That is no mysql;
If you have any , Delete it :
rpm -e --nodeps The name of the document found
rpm -e --nodeps mariadb-libs-5.5.52-1.el7.x86_64
rm -rf Directory name
yum remove mysql-libs #yum Delete by , If you use yum Installation mode
install mysql May be with MariaDB There are conflicts , So it needs to be deleted .
download 、 Upload 、 Unzip the relevant files
Download from the official website ( Or download according to your own needs )
mysql-5.7.24-linux-glibc2.12-x86_64.tar.gz
Upload to Linux, decompression , Move to /usr/local/:
rz -E
tar zxvf mysql-5.7.24-linux-glibc2.12-x86_64.tar.gz
mv mysql-5.7.24-linux-glibc2.12-x86_64 /usr/local/mysql

To configure
establish data
mkdir /usr/local/mysql/dataCreate user groups and users , modify mysql Authority
groupadd mysql useradd mysql -g mysql chown -R mysql:mysql mysql/
initialization MySQL, Record the returned password
/usr/local/mysql/bin/mysqld --initialize --user=mysql --datadir=/usr/local/mysql/data --basedir=/usr/local/mysql
password :h4jgn7s&aKz!Create soft link
Make global use of mysql command :
ln -s /usr/local/mysql/bin/mysql /usr/binMake available service Command to start-up :
ln -s /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql service mysql restartSign in MySQL
mysql -u root -p
After logging in , Change Password , Open remote permissions :
alter user 'root'@'localhost' identified by '123456'; use mysql; update user set user.Host='%' where user.User='root'; grant all privileges on *.* to root@'%' identified by '123456'; flush privileges; quitModify the configuration file /etc/my.cnf
vim /etc/my.cnf[mysqld] character_set_server=utf8 basedir=/usr/local/mysql datadir=/usr/local/mysql/data port=3306 socket=/tmp/mysql.sock sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES symbolic-links=0 max_connections=600 innodb_file_per_table=1 lower_case_table_names=1 #################### other Can not add #################### # China standard time , Will be output 08:00 # default-time_zone = '+8:00' # default-storage-engine=INNODB # collation-server=utf8_general_ci # Query settings # Open slow query log ( Or set 1) # slow_query_log=1 # # Specify the path to save the log file , If not specified, it will be in the database file directory by default Note that files must be created manually And authority # slow_query_log_file=/var/log/mysql_slow.log # # Specify how many seconds to slow a query subtle # long_query_time=5 # Record queries that do not use indexes # log_queries_not_using_indexes=on # It shows that it is allowed to record every minute slow log Not indexed sql Number of statements # log_throttle_queries_not_using_indexes=10 # How to store logs # log_output=FILE # sql_mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"restart mysql, Sign in , Use the following command to check lower_case_table_names Is it 1, by 1 Indicates that the configuration is modified successfully
show variables like "%case%";Set power on self start
chkconfig mysql onTurn off firewall ( Or expose the port )
systemctl stop firewalld.serviceinstallation is complete .
start-up MySQL
/usr/local/mysql/support-files/mysql.server start
service mysql start
service mysql restart
service mysql stop
ps -ef | grep mysql
Use navicat Successful connection :
If there is something wrong , Please understand and criticize , thank you ~
Reprint please indicate :
https://blog.csdn.net/vihem/article/details/123171414
边栏推荐
- Summary of problems in rv1109/rv1126 product development
- InnoDB data storage structure – MySQL
- Operation of simulated examination platform for 2022 safety officer-b certificate examination questions
- Difference between thread and task
- Abstract methods and interfaces
- Uview customer management JS
- Memory protection
- Spatial distribution data of China's tertiary watershed / national new area distribution data /npp net primary productivity data / spatial distribution data of vegetation cover / land use data /ndvi d
- LabVIEW關於TDMS和Binary存儲速度
- IC验证中的force/release 学习整理(5)研究对 reg类型信号的影响
猜你喜欢

L1-067 Roche limit (10 points)

InnoDB data storage structure – MySQL

Interview must ask: summary of ten classic sorting algorithms

Development of video preview for main interface of pupanvr-ui

Ubunt 20.04 uses CDROM or ISO as the installation source

Interview must ask: summary of ten classic sorting algorithms

JWT learning and use

Soil type, soil texture, soil nutrient and change data, soil organic matter, soil pH, soil nitrogen, phosphorus and potassium

Microsoft announces that it will discontinue support for older versions of visual studio

Acquisition of Lai data, NPP data, GPP data and vegetation coverage data
随机推荐
PostgreSQL age XID maintenance prevents the database from being read-only
Calculation method notes for personal use
Chapter 1
Lvgl8.1 hi3536c platform use
kali_ Nat mode, bridging Internet / host only_ detailed
Operation of simulated examination platform for theoretical question bank of G2 utility boiler stoker in 2022
[backtracking] backtracking method to solve combinatorial problems
Can‘t find a suitable configuration file in this directory or any parent. Error reporting and resolution
Day17 array features array boundary array application traversal array multidimensional array creation and traversal arrays operation array bubble sort
SQL注入上传一句话木马(转)
Enhanced vegetation index evi, NDVI data, NPP data, GPP data, land use data, vegetation type data, rainfall data
LabVIEW about TDMS and Binary Storage Speed
ShanMeng and Beijing Adoption Day start NFT digital collection public offering
Normalized vegetation index (NDVI) data, NPP data, GPP data, evapotranspiration data, vegetation type data, ecosystem type distribution data
[backtracking method] queen n problem
4.3 模拟浏览器操作和页面等待(显示等待和隐式等待、句柄)
Ecosystem type distribution data, land use data, vegetation type distribution and nature reserve distribution data
Pupanvr- some tool class objects (6)
Deploying a single node kubernetes cluster using rancher-2.5.5
12.26 exercise summary