当前位置:网站首页>Installing MySQL on Linux
Installing MySQL on Linux
2022-07-28 14:41:00 【Doumaishi】
The activation of a service requires the support of a database ,mysql Oracle SQL Server Etc., etc.
mysql It is the database I have used most since I worked , Companies of all sizes are using it
MySQL By MySQL AB company ( It has been SUN The company is under its command ) Independently developed , at present IT One of the most popular open source database management systems in the industry , It is also a relational database management system that supports multithreading, high concurrency and multi-user .
MySQL Is a relational database management system , Relational databases keep data in different tables , Instead of putting all the data in one big warehouse , This increases speed and flexibility .
Well, let's say I'm Centos 7 Linux Installation in environment Mysql step ( Pay attention to the version problem )
ps aux|grep mysql
Whether there is mysql Running
rpm -qa | grep mysqlRe examination mysql Whether there is
![]()
If there is, unload
rpm -e --nodeps mysql-libs-5.1.73-5.el6_6.x86_64 whereis mysqlThe query again mysql Related contents

rm -rf /usr/bin/mysql /usr/lib64/mysql /usr/local/mysqlRemove the corresponding folder
Well, the preparations are almost done
cd /usr/local/wget https://dev.mysql.com/get/Downloads/MySQL-5.7/mysql-5.7.24-linux-glibc2.12-x86_64.tar.gz![]()
That's all. mysql Download it
tar xzvf mysql-5.7.24-linux-glibc2.12-x86_64.tar.gzdecompression
mv mysql-5.7.24-linux-glibc2.12-x86_64 mysql
There is a mysql The catalog of
cd mysql/
mkdir data
mysql A folder is created data Folder
cd ~
chown -R mysql:mysql /usr/local/mysql
chmod -R 755 /usr/local/mysqladd to mysql The user group and user to which the folder belongs , And authority
cd /usr/local/mysql/bin

./mysqld --initialize --user=mysql --datadir=/usr/local/mysql/data --basedir=/usr/local/mysqlinitialization mysql It's done.
Pay attention to the end of the printed log [email protected]:XXXXXXXXXXXXXX The following string is mysql Administrator temporary login password .
vi /etc/my.cnf

[mysqld]
datadir=/usr/local/mysql/data
port=3306
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
symbolic-links=0
max_connections=600
innodb_file_per_table=1
lower_case_table_names=1
character_set_server=utf8Add the above content to the configuration file ok
cd ~
/usr/local/mysql/support-files/mysql.server startStart the service
ln -s /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql
ln -s /usr/local/mysql/bin/mysql /usr/bin/mysql
service mysql restartmysql -u root -p
Enter password:
mysql>set password for [email protected] = password('root');
mysql>use mysql;
msyql>update user set user.Host='%' where user.User='root';
mysql>flush privileges;The above commands are executed in sequence set password for [email protected] = password('root'); there password('root'); Inside root For the password you want to set
such mysql It has been successfully installed
边栏推荐
- 这3款在线PS工具,得试试
- ZABBIX distributed
- SwiftUI 4.0 的全新导航系统
- Thrift 序列化协议浅析
- OKR and grad
- 软件测试工程师的职业规划
- Hand in hand from 0 to a "Nuggets special attention" Google plug-in, 5000 words detailed vue3 responsive principle, the advantages, disadvantages and choices of several cache read-write schemes, flyin
- 为 @CloudStorage 添加了类 @Published 的能力
- 如何只降3D相机不降UI相机的分辨率
- 文件批量重命名工具Bulk Rename Utility
猜你喜欢

2022年安全员-A证操作证考试题库模拟考试平台操作

树莓派基础 | 总结记录树莓派学习过程中的一些操作

Getting started with scottplot tutorial: getting and displaying values at the mouse

HCIP第十一天

Hcip day 11

超好用的手机录屏软件推荐

Focus on differentiated product design, intelligent technology efficiency improvement and literacy education around new citizen Finance

Floating point data type in C language (did you learn to waste it)

Tdengine helps Siemens' lightweight digital solutions

【七夕】七夕孤寡小青蛙究极版?七夕节最终章!
随机推荐
(function(global,factory){
pix2pix
8、 Picker usage drop-down box selection effect
多线程顺序运行有几种方法?
10、 Timestamp
zabbix分布式
468 product planning and promotion plan (150 copies)
9、 Uni popup usage popup effect at the bottom of the drop-down box
【七夕】七夕孤寡小青蛙究极版?七夕节最终章!
C # read INI file and key value pair operation
Hcip day 11
Tdengine helps Siemens' lightweight digital solutions
pix2pix
Focus on differentiated product design, intelligent technology efficiency improvement and literacy education around new citizen Finance
2022 melting welding and thermal cutting examination questions and online simulation examination
HCIP第十二天
PowerDesigner creates a database model (conceptual model example)
SwiftUI 布局 —— 对齐
Iterator iterator interface
linux安装mysql