当前位置:网站首页>liunx基础命令讲解
liunx基础命令讲解
2022-08-02 12:11:00 【沐辰晨兮】
一.基础环境:
实验环境
1.本机为桌面安装
2.网络模式为nat ip:172.20.10.8
基础环境
1.可以ping通网络及网络设置
2.挂载镜像,及配置yum源仓库
最小安装需下载依赖环境
[[email protected] ~]#yum -y install wget.x86_64
[[email protected] ~]#yum -y install vim
[[email protected] ~]#yum -y install bash-completion
[[email protected] ~]#bash
二.安装Mysql并配置
1.检查基础环境是否预留mysql或mariadb的包:
查询是否安装了MySQL了
[[email protected]]# cd /etc/yum.repos.d
[[email protected] yum.repos.d]# rpm -qa | grep mysql
[[email protected] yum.repos.d]# rpm -qa | grep mariadb mariadb-libs-5.5.68-1.el7.x86_64
#强制卸载mariadb-lib
[[email protected] yum.repos.d]# rpm -e --nodeps mariadb-libs
[[email protected] yum.repos.d]# rpm -qa | grep mariadb
#安装mysql数据库
[[email protected] yum.repos.d]# wget https://dev.mysql.com/get/mysql80-community-release-el7-5.noarch.rpm #从网上获取mysql.rpm包
#安装rpm包
[[email protected] yum.repos.d]# rpm -ivh mysql80-community-release-el7-5.noarch.rpm
#清空缓存
[[email protected] ~ yum.repos.d]# yum makecache fast [[email protected] ~yum.repos.d]# yum repolist
2.安装mysql数据库及登录,修改密码
[[email protected] yum.repos.d]# yum -y install mysql-community-server
[[email protected] yum.repos.d]# grep "passwor" /var/log/mysqld.log 2022-04-15T01:10:12.626454Z 6 [Note] [MY-010454] [Server] A temporary password is generated for [email protected]: RbSv)lzrG6ts [[email protected] yum.repos.d]# mysql -u root -p Enter password: mysql> set password='[email protected]liu0301'; Query OK, 0 rows affected (0.00 sec) mysql> exit Bye
3.设置允许远程访问
[[email protected] ~]systemctl stop firewalld.service
[[email protected] ~]systemctl disable firewalld.service
4.修改mysql权限允许任何人连接
[[email protected] yum.repos.d]# mysql -u root -p Enter password: mysql> use mysql; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> select Host,User from user; +-----------+------------------+ | Host | User | +-----------+------------------+ | localhost | mysql.infoschema | | localhost | mysql.session | | localhost | mysql.sys | | localhost | root | +-----------+------------------+ 4 rows in set (0.00 sec) mysql> update user set Host='%' where User='root'; Query OK, 1 row affected (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 0 mysql> flush privileges; Query OK, 0 rows affected (0.01 sec) mysql> exit Bye
5.使用连接工具:使用Navicat连接工具测试
新建---mysql 注:密码为数据库密码 主机为虚拟机ip地址(密码要手动输入)
边栏推荐
- 力扣27-移除元素——简单题
- How to set up wireless PPI communication between Weiluntong touch screen and S7-200smart?
- 7种最常用数据分析思维,解决95%的分析难题
- 使用kubesphere图形界面创建一个devops的CI/CD流程
- Drools(8):WorkBench使用
- 数据湖(二):什么是Hudi
- 面积曲线AUC(area under curve)
- 项目监控六大事项
- 面积曲线AUC(area under curve)
- Do you really understand the business process service BPass?
猜你喜欢
随机推荐
用位运算为你的程序加速
AQS-AbstractQueuedSynchronizer
从幻核疑似裁撤看如何保证NFT的安全
AQS-AbstractQueuedSynchronizer
Golang map数组按字段分类
面积曲线AUC(area under curve)
Likou 58 - Left Rotation String
jacoco的学习以及理解
JSP中include指令的功能简介说明
记录代码
三种实现分布式锁的方式
Swift中什么时候不能用 () 代替 Void 来使用
技术分享| 融合调度系统中的电子围栏功能说明
【kali-信息收集】(1.8)ARP侦查工具_Netdiscover
npm run dev 和 npm run serve区别
借小程序容器打造自有App小程序生态
Chapter 11 Documents
力扣977-有序数组的平方——暴力法&双指针法
今日睡眠质量记录85分
学习经验分享之七:YOLOv5代码中文注释