服务器中的表
select
Host
,User
,Select_priv
,Insert_priv
,Update_priv
,Delete_priv
,Create_priv
,Drop_priv
,Reload_priv
,Shutdown_priv
,Process_priv
,File_priv
,Grant_priv
,References_priv
,Index_priv
,Alter_priv
,Show_db_priv
,Super_priv
,Create_tmp_table_priv
,Lock_tables_priv
,Execute_priv
,Repl_slave_priv
,Repl_client_priv
,Create_view_priv
,Show_view_priv
,Create_routine_priv
,Alter_routine_priv
,Create_user_priv
,Event_priv
,Trigger_priv
,Create_tablespace_priv
,ssl_type
,ssl_cipher
,x509_issuer
,x509_subject
,max_questions
,max_updates
,max_connections
,max_user_connections
,plugin
,authentication_string
,password_expired
,password_last_changed
,password_lifetime
,account_locked from user;
 
查询mysql所有用户<--两种-->
SELECT DISTINCT CONCAT('User: ''',user,'''@''',host,''';') AS query FROM mysql.user;
SELECT HOST,USER FROM mysql.user;
 
 
信息:
117.136.94.236
本机ip:192.168.42.23
39.108.172.95
121.43.18.69
sudo /usr/local/mysql/bin/mysql -uroot -pBF1f8357c50e
BF1f8357c50e</div>
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'BF1f8357c50e' WITH GRANT OPTION;flush privileges;</div>
 
 
出现:[emerg] 4613#0: bind() to 0.0.0.0:80 failed (98: Address already in use)错误!!!!!
解决方式:
使用命令关闭占用80端口的程序
sudo fuser -k 80/tcp
 
 
进入mysql命令:
mysql -hlocalhost(主机地址) -uroot(用户名) -p密码
 
关闭mysql命令:
mysql退出三种方法:
mysql > exit;
mysql > quit;
mysql > \q;
 
停止防火墙
sudo systemctl stop firewalld.service
并禁用防火墙服务
sudo systemctl disable firewalld.service
执行后效果:
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
 
安装iptables并启动该服务
 
#安装
sudo yum install iptables-services
执行后效果:
complate
 
#开启iptables
sudo systemctl enable iptables
sudo systemctl enable ip6tables
执行后效果:
Created symlink from /etc/systemd/system/basic.target.wants/iptables.service to /usr/lib/systemd/system/iptables.service.
Created symlink from /etc/systemd/system/basic.target.wants/ip6tables.service to /usr/lib/systemd/system/ip6tables.service.
 
#启动服务
sudo systemctl start iptables
sudo systemctl start ip6tables
 
查看防火墙状态
systemctl status firewalld
(dead)未开启状态
(running)开启状态
开启防火墙:
systemctl start firewalld
关闭防火墙:
systemctl stop firewalld
{开启/关闭}防火墙,命令行都没有效果可通过systemctl status firewalld查看防火墙状态
 
Warning: ALREADY_ENABLED: mysql    ==》警告:已经启用:mysql
 
 
 
若用本地sqlyog连接服务器上的mysql数据库则修改:
 
(1)Linux  centos7   将mysql加入防火墙
sudo firewall-cmd --zone=public --permanent --add-service=mysql
效果:
success
 
(2)重启防火墙
先关闭防火墙:
systemctl stop firewalld
后开启防火墙:
systemctl start firewalld
查看防火墙状态
systemctl status firewalld
效果:=======》如下、、、、、
(3)查询数据库使用权限
@1:连接数据库
mysql -uroot(用户名) -p密码
@2:拼写sql语句查询
select host,user from mysql.user;
效果形似:(注意此时没有红色区域的内容)
@3:为该(root)用户添加权限(任何ip都能访问此数据库===》%)
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'BF1f8357c50e' WITH GRANT OPTION;flush privileges;
@4:再次查询权限
select host,user from mysql.user;
此时效果应为:
(4)在sqlyog中连接数据库即可
 
 
 
 

使用sqlyog连接到服务器数据库,实现可视化数据操作。(完美解决版。)《亲测!!!!》的更多相关文章

  1. SQL不同服务器数据库之间的数据操作整理(完整版)

    ---------------------------------------------------------------------------------- -- Author : htl25 ...

  2. SQLServer服务器数据库之间的数据操作(完整版)

    分类: 数据库开发技术 ---------------------------------------------------------------------------------- -- Au ...

  3. 转载-SQL不同服务器数据库之间的数据操作整理(完整版) .

    ---------------------------------------------------------------------------------- -- Author : htl25 ...

  4. 不同服务器数据库之间的数据操作 sp_addlinkedserver

    --创建链接服务器  exec sp_addlinkedserver   'ITSV ', ' ', 'SQLOLEDB ', '远程服务器名或ip地址 '  exec sp_addlinkedsrv ...

  5. 转:不在同一个服务器上的数据库之间的数据操作(oracle/sql server的对比)

    如何操做不在同一个数据库中的数据操作: 一.对于SQL server来讲:  1.采用创建链接服务器的方式:    (1).创建链接服务器       exec sp_addlinkedserver  ...

  6. 数据库 MySQL 之 数据操作

    数据库 MySQL 之 数据操作 一.MySQL数据类型介绍 MySQL支持多种类型,大致可以分为四类:数值.字符串类型.日期/时间和其他类型. ①二进制类型 bit[(M)] 二进制位(101001 ...

  7. [Python] Python 学习 - 可视化数据操作(一)

    Python 学习 - 可视化数据操作(一) GitHub:https://github.com/liqingwen2015/my_data_view 目录 折线图 散点图 随机漫步 骰子点数概率 文 ...

  8. 基于Git的数据库sql文件的管理——完美解决团队sql操作协同问题

    目录 基于Git的数据库sql文件的管理--完美解决团队sql操作协同问题 1.产生背景 2.之前没用Git管理数据库出现的问题 2.1 用同一个库调试带来的问题 3.解决方案 3.1 Sql文件的创 ...

  9. 不同服务器数据库之间的数据定时同步到sql server (支持mysql,oracle数据库同步到sql server)

    1,在目标数据库新增服务器对象->连接到服务器->新建服务器连接 2,编写数据同步业务PROC ALTER PROC TestProc AS BEGIN --打开完全事物回滚 SET XA ...

随机推荐

  1. eclipse 远程调试mapreduce

    使用环境:centos6.5+eclipse(4.4.2)+hadoop2.7.0 1.下载eclipse hadoop 插件  hadoop-eclipse-plugin-2.7.0.jar 粘贴到 ...

  2. Java中创建数组的几种方法

    Java中创建数组的几种方法 public static void main(String[] args) { //创建数组的第一种方法 int[] arr=new int[6]; int intVa ...

  3. 2018.09.16 codeforces1041C. Coffee Break(双端队列)

    传送门 真心sb题啊. 考场上最开始看成了一道写过的原题... 仔细想了一会发现看错了. 其实就是一个sb队列. 每次插入到队首去就行了. 代码: #include<bits/stdc++.h& ...

  4. 2018.07.12 atcoder Go Home(贪心)

    传送门 题意简述:大家在数轴上生活,公司在 s. 班车送所有人回家,有 n 个住处,第 i 个位置在 xi,居住了 pi 的人. 保证 xi 互不相同. 大家⼀起投票向前还是向后,如果票数相同就固定向 ...

  5. autolayout之后获取uiview的frame

    这个只要一行代码就搞定了.详细请看: In order to get the right frame/bounds of your UIImageView after resizing, you ne ...

  6. CDialog类

    CDilalog包含三个关键函数:OnInitDialog.OnOK和OnCancel,可以覆盖这三个函数初始化对话框.响应点击OK和Cancel按钮.尽管每个函数都响应一条对话框消息,但是不需要你提 ...

  7. Codeforces807 B. T-Shirt Hunt 2017-05-08 23:23 175人阅读 评论(0) 收藏

    B. T-Shirt Hunt time limit per test 2 seconds memory limit per test 256 megabytes input standard inp ...

  8. ZOJ2405 Specialized Four-Digit Numbers 2017-04-18 20:43 44人阅读 评论(0) 收藏

    Specialized Four-Digit Numbers Time Limit: 2 Seconds      Memory Limit: 65536 KB Find and list all f ...

  9. 从问题域看hadoop的各种技术

    近些年来Hadoop生态系统发展迅猛,它本身包含的软件越来越多,同时带动了周边系统的繁荣发展.尤其是在分布式计算这一领域,系统繁多纷杂,时不时冒出一个系统,号称自己比MapReduce或者Hive高效 ...

  10. OneDrive不能上了?DNS被污染,解决方法很简单

    http://www.expreview.com/34434.html 除了LINE以外,最近微软的OneDrive云存储服务也出现访问故障,不过@月光博客 表示它只是受到DNS污染,被解析为无法访问 ...