当前位置:网站首页>Linux安装MySQL
Linux安装MySQL
2022-08-06 18:12:00 【Gan_1314】
将mysql-8.0.29-linux-glibc2.12-x86_64.tar.xz安装包上传至服务器/usr/local/目录
tar -xzvf mysql-8.0.29-linux-glibc2.12-x86_64.tar.xz
mv mysql-8.0.29-linux-glibc2.12-x86_64.tar.xz mysql
cd mysql
mkdir data
cd /usr/local/mysql/bin
./mysqld --user=root --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data/ --initialize

cd /usr/local/mysql
cp -a ./support-files/mysql.server /etc/init.d/mysql
chmod +x /etc/init.d/mysql
chkconfig --add mysql
ln -s /usr/local/mysql/bin/mysql /usr/bin
启动MySQL:
service mysql start
service mysql status
mysql mysql -uroot -p 输入上面的临时密码
修改root密码
执行命令 ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'root';
执行 flush privileges; 使密码生效
修改远程连接
update user set host=‘%’ where user=‘root’;
flush privileges;
exit;
firewall-cmd --add-port=3306/tcp --permanent
firewall-cmd --reload
引用文件:
https://www.cnblogs.com/kire-cat/p/16361559.html
https://www.javazxz.com/thread-11184-1-1.html
边栏推荐
- Interview Cheats | Common Interview Questions for Interface Tests
- `Mathematics` Fundamental Theorem of Calculus
- el-input textarea display custom remaining word count
- selenium webDriver的运用
- JUC并发容器1(CopyOnWriteArrayList、CopyOnWriteArraySet、ConcurrentSkipListSet)
- 3年测试经验,突然很迷茫,软件测试工程师的出路在哪?
- Euro-NCAP-2023 安全辅助避撞系统测试流程中文版
- Nextcloud -1- 私人云盘安装配置
- CarSim仿真快速入门(十七)—ADAS范围和跟踪传感器
- 宝塔实测-PHP网页版在线客服系统源码
猜你喜欢

优秀的软件测试工程师是怎样练成的?

ESP8266-Arduino编程实例-磁簧开关传感器驱动

Romance for Single Dogs After Valentine's Day
![[The Beauty of Software Engineering - Column Notes] 39 | Project Summary: Do a good job in project review and turn experience into ability](/img/4d/0d96519b527034cebcfc66dfc6031f.png)
[The Beauty of Software Engineering - Column Notes] 39 | Project Summary: Do a good job in project review and turn experience into ability

数学建模学习(79):Matlab神经网络工具箱使用,实现多输入多输出预测

Sketch91:如何设置对齐的参考对象,根据指定元素进行对齐教程

二极管选型指南

吴恩达深度学习deeplearning.ai——第一门课:神经网络与深度学习——第三节:浅层神经网络

Flyway error source code analysis - Validate failed: Migrations have failed validation

ESP8266-Arduino编程实例-L9110直流电机风扇传感器模块
随机推荐
亚马逊测评系统是什么,跨境卖家如何通过自己养号来实现快速出单?
qt使用mysql数据库
Scala----For loop---02
C# 将文件转换为 Stream
电脑一键重装系统发现内存占用率过高怎么办
Redis basis
`English` 2022/8/3
Secrets are stored in etcd without encryption by default
DMA/DMA2D概念
Hardcore!The internal manual "MySQL Notes" written by the technical director of Ali is really strong
ESP8266-Arduino programming example-force sensitive resistance sensor
From VLAN to IPVLAN: Talking about virtual network devices and their cloud-native applications
[QNX Hypervisor 2.2用户手册]10.9 vdev pckeyboard
`QT` exe packaged and released
c语言分层理解(c语言结构体(上))
PreScan快速入门到精通第二十一讲驾驶员模型之驾驶员在环
吴恩达深度学习deeplearning.ai——第一门课:神经网络与深度学习——第三节:浅层神经网络
el-input textarea显示自定义剩余字数
美客多、虾皮平台测评自养号怎么做?
USB通讯原理