当前位置:网站首页>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地址(密码要手动输入)
边栏推荐
猜你喜欢
随机推荐
MD5 detailed explanation (check file integrity)
基于深度学习的裂缝检测技术
Running yum reports Error: Cannot retrieve metalink for reposit
使用kubesphere图形界面创建一个应用操作流程
npm WARN config global `--global`, `--local` are deprecated. Use `--location解决方案
7种最常用数据分析思维,解决95%的分析难题
以Boost为例的type3电压环补偿器实例
openresty 性能优化
SQL function TRIM
三种实现分布式锁的方式
Create your own app applet ecosystem with applet containers
[kali-information collection] (1.8) ARP reconnaissance tool _Netdiscover
Seneor Exposure Basics
基于深度学习的裂缝检测技术
大疆P4M云遮挡矫正
Thymeleaf
测试开发之路,我在大厂做测试这四年的感悟
simulink PID自动整定
第十四章 手动创建 REST 服务(二)
Problem solving in the process of using mosquitto