当前位置:网站首页>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
边栏推荐
- 58子站安居,经纪人营销管理平台登录接口加密逆向
- These three online PS tools should be tried
- QQ robot configuration record based on nonebot2
- 十、时间戳
- @DS('slave') 多数据源兼容事务问题解决方案
- 分集技术简略
- 多所“双一流”大学,保研预报名启动!
- [线程安全问题] 多线程到底可能会带来哪些风险?
- Super resolution reconstruction based on deep learning
- Digital transformation security issues occur frequently, and Shanshi Netcom helps build a digital government
猜你喜欢

2022低压电工考试题及答案

手机滚动截屏软件推荐

这3款在线PS工具,得试试

2022 safety officer-a certificate operation certificate examination question bank simulated examination platform operation

ScottPlot入门教程:获取和显示鼠标处的数值

软件测试的发展与定义

Development and definition of software testing

Raspberry pie foundation | summarize and record some operations in the learning process of raspberry pie

linux安装redis

Leetcode 0143. rearrange linked list
随机推荐
Digital transformation security issues occur frequently, and Shanshi Netcom helps build a digital government
2022 melting welding and thermal cutting examination questions and online simulation examination
Qt中QTableView设置分页显示的三种方法[通俗易懂]
2022 melting welding and thermal cutting examination questions and online simulation examination
为自定义属性包装类型添加类 @Published 的能力
It's so hot that solar power can't take off? Hello, head
[线程安全问题] 多线程到底可能会带来哪些风险?
ScottPlot入门教程:获取和显示鼠标处的数值
3种方法解轮转数组
[ecmascript6] other new interface features
js的实例化方式
Getting started with scottplot tutorial: getting and displaying values at the mouse
如何只降3D相机不降UI相机的分辨率
Recommended super easy-to-use mobile screen recording software
SwiftUI 4.0 的全新导航系统
围绕新市民金融聚焦差异化产品设计、智能技术提效及素养教育
Focus on differentiated product design, intelligent technology efficiency improvement and literacy education around new citizen Finance
如何在 Core Data 中进行批量操作
Node文件操作
手机滚动截屏软件推荐