当前位置:网站首页>mysql_linux版本的下載及安裝詳解
mysql_linux版本的下載及安裝詳解
2022-04-23 18:48:00 【#眼鏡&】
文章目錄
1、mysql的下載
MySQL 的官網下載地址: 官網




2、mysql的安裝
上傳到: /usr/local/mysql
查看centos自帶的mysql,若存在則移除
rpm -qa | grep mysql # 查看
rpm -ev mysql-libs-* --nodeps # 删除
安裝rpm包
rpm -ivh mysql-community-client-5.7.25-1.el6.x86_64.rpm --force --nodeps
rpm -ivh mysql-community-common-5.7.25-1.el6.x86_64.rpm --force --nodeps
rpm -ivh mysql-community-libs-5.7.25-1.el6.x86_64.rpm --force --nodeps
rpm -ivh mysql-community-server-5.7.25-1.el6.x86_64.rpm --force --nodeps
–force --nodeps: 錶示安裝時不檢查依賴關系
啟動mysql
# 查看mysql的狀態
service mysqld status
service mysqld start
初始化隨機密碼
cat /var/log/mysqld.log | more
查看隨機密碼:
grep pass /var/log/mysqld.log --color
登陸並修改密碼:
[root@web ~]#mysql -uroot -p
mysql> set password='Pwd@123456';
mysql> grant all privileges on *.* to 'root'@'%' identified by 'Pwd@123456';
設置開機自啟動
chkconfig --add mysql
# 查看是否添加成功
chkconfig --list
如果上一步添加不成功,則手動添加到啟動配置文件裏
vim /etc/rc.d/rc.local
# 添加
service mysqld start
防火牆端口策略
# 添加3306端口
/sbin/iptables -I INPUT -p tcp --dport 3306 -j ACCEPT
# 保存
/etc/init.d/iptables save
# 重啟
service iptables restart
# 查看狀態
/etc/init.d/iptables status
版权声明
本文为[#眼鏡&]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231848086201.html
边栏推荐
- 使用晨曦记账本,分析某个时间段每个账户收支结余
- Seata处理分布式事务
- ESP32 LVGL8. 1 - label (style 14)
- Teach you to quickly rename folder names in a few simple steps
- Daily network security certification test questions (April 15, 2022)
- The first leg of the national tour of shengteng AI developer creation and enjoyment day was successfully held in Xi'an
- MVVM模型
- Daily network security certification test questions (April 12, 2022)
- Introduction to ROS learning notes (I)
- ctfshow-web361(SSTI)
猜你喜欢

ESP32 LVGL8. 1 - bar progress bar (bar 21)

Query the logistics update quantity according to the express order number

【历史上的今天】4 月 23 日:YouTube 上传第一个视频;网易云音乐正式上线;数字音频播放器的发明者出生

Promote QT default control to custom control

iptables初探

ESP32 LVGL8. 1 - textarea text area (textarea 26)

os_authent_prefix

Druid SQL和Security在美团点评的实践

After opening the original normal project, the dependency package displays red and does not exist.

One of the reasons why the WebView web page cannot be opened (and some WebView problem records encountered by myself)
随机推荐
解决:cnpm : 無法加載文件 ...\cnpm.ps1,因為在此系統上禁止運行脚本
ESP32 LVGL8. 1 - BTN button (BTN 15)
iptables初探
listener. log
Esp32 (UART receiving and sending) - receiving and sending communication of serial port (4)
: app: transformclasseswithrobustfordevrease meituan hot repair compilation error record
Seata处理分布式事务
Introduction to ROS learning notes (II)
纠结
ESP32 LVGL8. 1 - slider slider (slider 22)
Practice of Druid SQL and security in meituan review
CISSP certified daily knowledge points (April 13, 2022)
Nacos cluster construction and MySQL persistence configuration
机器学习理论之(7):核函数 Kernels —— 一种帮助 SVM 实现非线性化决策边界的方式
ESP32 LVGL8. 1 - event (event 17)
Machine learning practice - naive Bayes
Excel intercept text
Domestic GD chip can filter
PyGame tank battle
Keil RVMDK compiled data type