mysql 授权 user@'%' 为什么登陆的时候localhost 不行呢???
公司业务服务器还没迁移到阿里云上的时候,创建的一个用户明明是所有的,但是本机登陆就是不行,一直也搞不懂原因
今天才知道 原来 %不包括 localhost
mysql> grant all on salt.* to salt@'%' identified by 'salt';
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
[root@saltstack_s yum.repos.d]# mysql -u salt -psaltpasswd@123 -h localhost #登陆不了的原因。是因为上面授权的*不包括localhost
ERROR 1045 (28000): Access denied for user 'salt'@'localhost' (using password: YES)
[root@saltstack_s ~]# mysql -usalt -p -h 192.168.92.128
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.73 Source distribution
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
mysql 授权 user@'%' 为什么登陆的时候localhost 不行呢???的更多相关文章
- mysql安装以后无法登陆的的解决方法((ERROR 1698 (28000): Access denied for user 'root'@'localhost'))
mysql安装以后无法登陆的的解决方法((ERROR 1698 (28000): Access denied for user 'root'@'localhost')) 解决步骤: [====> ...
- Mysql授权GRANT ALL PRIVILEGES
1. 改表法. 可能是你的帐号不允许从远程登陆,只能在localhost.这个时候只要在localhost的那台电脑,登入mysql后,更改 "mysql" 数据库里的 " ...
- MySQL 授权详解
(1)确认一下3306是否对外开放,mysql默认状态下是不开放对外访问功能的.查看的办法如下: 1 2 3 4 5 6 7 netstat -an | grep 3306 tcp 0 ...
- sql点滴43—mysql允许用户远程登陆
方法1 局域网连接mysql报错: ERROR 1130: Host '192.168.0.220' is not allowed to connect to this MySQL server 解 ...
- MySQL授权(用户权限)
一.mysql查询与权限 (二)授权 用户管理: 设置用户密码 前期准备工作: 停止服务 将配置文件当中的skip-grant-tables删除掉 重启服务: 执行修改命令 查看用户状态(如果数据过多 ...
- MYSQL设置远程账户登陆总结,mysql修改、找回密码、增加新用户,MySQL数据库的23个注意事项
1.5 设置及修改Mysql root用户密码1 设置密码方法mysqladmin -u root password '123456'mysqladmin -u root -p'123456' pas ...
- 专门讲讲这个MYSQL授权当中的with grant option的作用
对象的owner将权限赋予某个用户(如:testuser1) grant select ,update on bd_corp to testuser1 [with grant option ]1.如果 ...
- mySQL授权(让从服务器用户可以登录到主服务器)
mySQL授权(让从服务器用户可以登录到主服务器) 1.查看用户授权表 ? 1 select user,host,password from mysql.user; 2.给用户设置密码 ? 1 2 u ...
- MySQL的几种登陆方式
MySQL的几种登陆方式 登录方式一: [root@001 tmp]# mysql -h 127.0.0.1 -u root -p 这是最标准的登录方式,意指通过tTCP/IP协议进行连接,因为 ...
随机推荐
- git实用攻略
Git是一款免费.开源的分布式版本控制系统,用于敏捷高效地处理任何或小或大的项目. 下面是实用教程,免基础. 一.安装git https://git-scm.com/downloads 二.git创建 ...
- discuz怎么根据连接知道调用的是什么模板页面
其实不怎么难,基本都可以看出discuz是怎么样调用模板页面的 这个是论坛的帖子的列表页,看到url就可以看出是forum目录下的forumdisplay这个模板,forumdisplay.html这 ...
- ST_SRID
定义 ST_SRID 以 ST_Geometry 对象作为输入参数,返回其空间参考 ID. 语法 sde.st_srid (g1 sde.st_geometry) 返回类型 整型 示例 创建下列表格: ...
- PHP 设计模式 笔记与总结(1)命名空间 与 类的自动载入
① PHP 面向对象高级特性 ② 11 种 PHP 设计模式 ③ PSR-0,Composer,Phar 等最流行的技术 目标是掌握 PHP 各类设计模式,以及具备设计纯面向对象框架和系统的能力 [命 ...
- UIButton的遍历
for (id obj in self.view.subviews) { if ([obj isKindOfClass:[UIButton class]]) { ...
- centos时间同步方法
centos时间同步方法 电脑软硬件应用网 45IT.COM 时间:2012-12-08 18:09 作者:李本清 新装的服务器可能设置了错误的,需要调整时区并调整时间.如下是使用NTP来从一个时间服 ...
- 【IOS笔记】Views
Views Because view objects are the main way your application interacts with the user, they have many ...
- System.Data.OracleClient.OracleConnection已过时
解决办法如下: 1.把原来的using System.Data.OracleClient;去掉 2.在oracle安装目录下找到Oracle.DataAccess.dll 添加引用:using Ora ...
- Allowed memory size Out of memory ini_set('memory_limit', '-1');
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 51 bytes) ini_set(' ...
- von Neumann architecture
COMPUTER ORGANIZATION AND ARCHITECTURE DESIGNING FOR PERFORMANCE NINTH EDITION 3.1 COMPUTER COMPONEN ...