当前位置:网站首页>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地址(密码要手动输入)
边栏推荐
猜你喜欢
NVIDIA NeMo Metrics 轻量性能采集系统
Drools(8): WorkBench uses
Problem solving in the process of using mosquitto
MD5详解(校验文件完整性)
Crack detection technology based on deep learning
软件成分分析:手握5大能力守护软件供应链安全
以Boost为例的type3电压环补偿器实例
excel 批量翻译-excel 批量函数公司翻译大全免费
受邀出席Rust开发者大会|Rust如何助力量化高频交易?
When not to use () instead of Void in Swift
随机推荐
MyCat2的介绍与安装以及基本使用
Pod调度策略:亲和性、污点与污点容忍
How to set up wireless PPI communication between Weiluntong touch screen and S7-200smart?
项目监控六大事项
Drools(8): WorkBench uses
【项目管理技术的优势】
使用kubesphere图形界面创建一个devops的CI/CD流程
MD5 detailed explanation (check file integrity)
Solve the problem of Chinese garbled characters in exporting excel file names
喜迎八一 《社会企业开展应聘文职人员培训规范》团体标准出版发行会暨橄榄枝大课堂上线发布会在北京举行
AQS-AbstractQueuedSynchronizer
Metaverse "Drummer" Unity: Crazy expansion, suspense still exists
看我如何用多线程,帮助运营小姐姐解决数据校对系统变慢!
【Acunetix-忘记密码】
Thymeleaf
记录代码
雷克萨斯,锁死的安全,挡不住的心寒
手撸架构,网络 面试36问
大疆P4M云遮挡矫正
MySQL主从复制几个重要的启动选项