当前位置:网站首页>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地址(密码要手动输入)


边栏推荐
猜你喜欢
随机推荐
Create an application operation process using the kubesphere GUI
力扣209-长度最小的字符串——滑动窗口法
The use of QListView
Leek 151 - Reverse words in a string
Metaverse "Drummer" Unity: Crazy expansion, suspense still exists
ABAP-OOAVL模板程序
CCF论文会议 IEEE 如何查询某个会议期刊的所有文章
How to set up wireless PPI communication between Weiluntong touch screen and S7-200smart?
DTG-SSOD:最新半监督检测框架,Dense Teacher(附论文下载)
阿苹的思考
匹配滤波(四种滤波器的幅频特性)
如何通过DBeaver 连接 TDengine?
jacoco的学习以及理解
服务器间传输文件
故障分析 | 一条 SELECT 语句跑崩了 MySQL ,怎么回事?
Likou 58 - Left Rotation String
WebUI自动化测试框架搭建从0到1(完整源码)更新完毕
redis cluster cluster, the ultimate solution?
【云驻共创】数据工坊平台,0代码开发数据处理业务“快”人一步
面积曲线AUC(area under curve)








