当前位置:网站首页>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://blog.csdn.net/qq_45858803/article/details/124357241
边栏推荐
- PyGame tank battle
- ctfshow-web362(SSTI)
- Use bitnami / PostgreSQL repmgr image to quickly set up PostgreSQL ha
- QT excel operation summary
- CANopen usage method and main parameters of object dictionary
- Golang 语言实现TCP UDP通信
- Machine learning theory (8): model integration ensemble learning
- Scrollto and scrollby
- Machine learning practice - naive Bayes
- Nacos集群搭建和mysql持久化配置
猜你喜欢
Esp32 (UART receiving and sending) - receiving and sending communication of serial port (4)
机器学习实战 -朴素贝叶斯
机器学习理论之(7):核函数 Kernels —— 一种帮助 SVM 实现非线性化决策边界的方式
纠结
使用 bitnami/postgresql-repmgr 镜像快速设置 PostgreSQL HA
Use Chenxi bookkeeping book to analyze the balance of revenue and expenditure of each account in a certain period of time
Esp32 (UART 485 communication) - 485 communication of serial port (3)
ESP32 LVGL8. 1. Detailed migration tutorial of m5stack + lvgl + IDF (27)
ESP32 LVGL8. 1 - calendar (calendar 25)
On iptables
随机推荐
Actual combat of Nacos as service configuration center
QT excel operation summary
os_ authent_ Prefix
kettle庖丁解牛第17篇之文本文件输出
ESP32 LVGL8. 1 - img picture (IMG 20)
Nacos作为服务配置中心实战
纠结
Daily network security certification test questions (April 14, 2022)
WebView saves the last browsing location
#yyds干货盘点#stringprep --- 因特网字符串预备
ESP32 LVGL8. 1 - event (event 17)
Go 语言 GUI 框架 fyne 中文乱码或者不显示的问题
CISSP certified daily knowledge points (April 12, 2022)
Can filter
ESP32 LVGL8. 1 - msgbox message box (msgbox 28)
程序员如何快速开发高质量的代码?
ESP32 LVGL8. 1 - anim animation (anim 16)
Keil RVMDK compiled data type
Daily network security certification test questions (April 12, 2022)
视频边框背景如何虚化,简单操作几步实现