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


边栏推荐
- SuperSlide系列之轮播图
- 7种最常用数据分析思维,解决95%的分析难题
- Likou 58 - Left Rotation String
- Metaverse "Drummer" Unity: Crazy expansion, suspense still exists
- LeetCode笔记:Weekly Contest 304
- np.nan, np.isnan, None, pd.isnull, pd.isna 整理与小结
- 【Acunetix-忘记密码】
- LeetCode第三题(Longest Substring Without Repeating Characters)三部曲之一
- 前男友买辣椒水威胁要抢女儿,女方能否申请人身安全保护令?
- 服务器间传输文件
猜你喜欢
随机推荐
手撸架构,网络 面试36问
QAbstractScrollArea、QScrollArea
Idea 全局搜索(idea如何全局搜索关键字)
numpy&pands 中的unique
力扣58-左旋转字符串
如何在 UE4 中制作一扇自动开启的大门
unique in numpy & pandas
LeetCode第三题(Longest Substring Without Repeating Characters)三部曲之一
npm run dev 和 npm run serve区别
When not to use () instead of Void in Swift
解决导出excel文件名中文乱码的问题
Crack detection technology based on deep learning
jacoco的学习以及理解
力扣209-长度最小的字符串——滑动窗口法
解决anaconda下载pytorch速度极慢的方法
SuperSlide系列之轮播图
[kali-information collection] (1.9) Metasploit + search engine tool Shodan
【Acunetix-忘记密码】
redis cluster cluster, the ultimate solution?
【MySQL系列】- LIKE查询 以%开头一定会让索引失效吗









