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协议进行连接,因为 ...
随机推荐
- Layui - 示例
示例地址 http://www.layui.com/demo/ 下载地址 http://www.layui.com/ 示例代码 <!doctype html> <html> & ...
- SVN版本管理系统的安装 CentOS + Subversion + Apache + Jsvnadmin
CI服务器:192.168.4.221 root用户操作 建议安装前更新操作系统 # yum update 更新完成后重启 # reboot 安装 ...
- linux下挂在u盘,移动硬盘的方法,转移服务器资料的时候,使用移动硬盘什么最方便了
本文章是在centos环境下操作的 最近linux服务器我不小心吧root下面的用户配置,不能远程登录,而且我对linux系统配置也不熟悉,最后的办法就是去了一趟机房,还好是在深圳南山科技园,不算太远 ...
- WEB系统开发
最近根据项目组需求做了web工作流程系统,就是一个简单的web管理系统,取代原先使用的excel表格,在VS2008下面开发,数据库使用Mysql,使用Mysql-connecte 5.0与数据库连接 ...
- cursor:pointer
.cursor_hand{ cursor:pointer; }
- Overengineering
https://en.wikipedia.org/wiki/Overengineering Overengineering (or over-engineering) is the designing ...
- JAVA函数的返回值类型详解以及生成随机数的例题
函数的四要素:函数名.输入.输出(返回).加工. 函数分为两种:一种是有返回值得函数,一种是没有返回值的函数. 1. 定义:没有返回值的函数:(当我不需要函数的计算结果再拿出来进行运算的时候,我就不需 ...
- find grep 组合使用
1. 查找所有".h"文件 find /PATH -name "*.h" 2. 查找所有".h"文件中的含有"helloworld ...
- phpcms v9模版调用代码大全(全面而实用)
首页调用栏目 {pc:content action="category" siteid="$siteid" num="15" order=& ...
- UIView 的粗浅解析
The UIView class defines a rectangular area on the screen and the interfaces for managing the conten ...