服务器Centos部署MySql并连接Navicat过程详解
作者:bashliuhe 时间:2024-01-15 11:53:30
(1)服务器配置:
[root@localhost ~]# cd /usr/local/src/
[root@localhost src]# wget http://repo.mysql.com/mysql57-community-release-el7-8.noarch.rpm
[root@localhost src]# rpm -ivh mysql57-community-release-el7-8.noarch.rpm
"""
mysql-community-client-5.7.30-1.el7.x86_64.rpm
mysql-community-server-5.7.31-1.el7.x86_64.rpm
"""
将这两个个rpm包,以FTP形式导入:/var/cache/yum/x86_64/7/mysql57-community/packages/
[root@localhost src]# yum -y install mysql-server
等待时间较长
(2)重置密码与创建用户
#重启mysql服务
[root@VM-0-3-centos src]# service mysqld restart
#重置密码
[root@localhost ~]# grep "password" /var/log/mysqld.log
#密码重置mysql> alter user 'root'@'localhost' identified by 'password';//密码重置,新的密码
Query OK, 0 rows affected (0.00 sec)
#创建新的用户,
mysql> create user 'username'@'%' identified by 'paswword';//添加新的用户,密码
Query OK, 0 rows affected (0.00 sec)#给新用户分权限mysql> grant all privileges on *.* to 'user1'@'%' with grant option;
Query OK, 0 rows affected (0.00 sec)
#刷新权限
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.00 sec)
#刷新权限
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
(3)查询MySql当前用户:
mysql> select user,host from mysql.user;
+---------------+-----------+
| user | host |
+---------------+-----------+
| user1 | % |
| mysql.session | localhost |
| mysql.sys | localhost |
| root | localhost |
+---------------+-----------+
4 rows in set (0.00 sec)
mysql>
(4)实现在Navicat上连接
【常规】端配置参数
【SSH】端配置参数
来源:https://www.cnblogs.com/bashliuhe/p/13334354.html
标签:Centos,部署,MySql,Navicat
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
描述性列表的表现形式
2008-09-17 13:43:00
influx+grafana自定义python采集数据和一些坑的总结
2022-08-23 14:55:54
![](https://img.aspxhome.com/file/2023/6/107246_0s.png)
python实现自动抢课脚本的示例代码
2022-03-12 08:16:19
![](https://img.aspxhome.com/file/2023/5/128635_0s.png)
Mysql数据库清理binlog日志命令详解
2024-01-14 09:04:07
![](https://img.aspxhome.com/file/2023/4/96494_0s.jpg)
pycharm中jupyter的使用图文教程
2023-10-01 13:36:11
![](https://img.aspxhome.com/file/2023/7/115427_0s.png)
实例讲解python中的协程
2022-08-10 20:10:38
Mysql 乘法除法精度不一致问题(除法后四位小数)
2024-01-13 09:44:16
PHP 正则判断中文UTF-8或GBK的思路及具体实现
2024-06-05 09:49:00
一文教会你pandas plot各种绘图
2021-04-29 19:41:11
![](https://img.aspxhome.com/file/2023/7/133777_0s.png)
Python中优雅使用assert断言的方法实例
2021-03-27 12:56:58
python中安装Scrapy模块依赖包汇总
2023-11-08 07:06:25
python 编码中为什么要写类型注解?
2022-09-25 22:48:34
详解Python如何轻松实现定时执行任务
2022-02-02 16:44:42
![](https://img.aspxhome.com/file/2023/5/88995_0s.png)
Python 制作自动化翻译工具
2022-08-17 05:34:50
![](https://img.aspxhome.com/file/2023/0/134970_0s.png)
Python中条件选择和循环语句使用方法介绍
2023-01-08 23:08:03
mysql 如何插入随机字符串数据的实现方法
2024-01-19 11:43:02
详解Python yaml模块
2022-08-14 12:15:18
网页禁用右键实现代码(JavaScript代码)
2024-02-26 09:46:23
MySQL中order by排序语句的原理解析
2024-01-24 15:43:23
![](https://img.aspxhome.com/file/2023/2/124552_0s.png)
SQL Server四个系统表的知识讲解
2024-01-29 00:13:57