一 这种情况下是 root@%

update mysql.user set host='%' where user='root' and host='localhost';

flush privileges;

select user,host from mysql.user;

 
 

然而当我用

mysql -uroot -p 登陆创建帐号

grant all privileges on sp2p_yxc_xiaolong.* to 'dev'@'%' identified by 'dev';

报错...mysql ERROR 1045...

 
 

解决:mysql -uroot -p -h192.168.x.x登陆可以正常创建.

 
 

说明:

刚开始时候 是root@localhost,被我改成了root@%后执行的上面步骤,,待我创建成功后,我又改回了root@localhost.

 
 

mysql ERROR 1045 (28000): Access denied for user解决方法的更多相关文章

  1. mysql ERROR 1045 (28000): Access denied for user解决方法 (转)

    问题重现(以下讨论范围仅限Windows环境): C:\AppServ\MySQL> mysql -u root -pEnter password:ERROR 1045 (28000): Acc ...

  2. mysql5.7 ERROR 1045 (28000): Access denied for user解决方法

    https://blog.csdn.net/csy2961903/article/details/51345401  参考此文注意指名数据库mysql.user

  3. Mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost'(using password: YSE)

    安装mysql后,使用命令登录mysql居然报错了,Mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost'(using ...

  4. 【技术贴】解决Mysql ERROR 1045 (28000): Access denied for

    今天Mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost' 肯定是密码不对了.那么重置一下密码吧. 打开 cmd 输入以 ...

  5. MySQL ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO

    MySQL安装完server端和客户端后,登录Mysql时报错:[root@rhel204 MySQL 5.6.23-RMP]# mysqlERROR 2002 (HY000): Can't conn ...

  6. MYSQL ERROR 1045 (28000) Access denied for user (using password YES)问题的解决

    我的Linux是Centos6.7的版本,本机上Mysql突然怎么连接都进不去 报错:MYSQL ERROR 1045 (28000) Access denied for user (using pa ...

  7. MySQL ERROR 1045 (28000): Access denied for user 'root'@'localhost'解决

    MySQL ERROR 1045 (28000): Access denied for user 'root'@'localhost'解决: # /etc/init.d/mysql stop # my ...

  8. MySql ERROR 1045 (28000): Access denied 错误

    [MySql ERROR 1045 (28000): Access denied 错误] 即登陆错误,使用MySql登陆时,需使正确的username/passwd.通过 -u -p 参数即可. My ...

  9. 解决Mysql ERROR 1045 (28000): Access denied for user 'root'@'localhost'问题

    ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) Red Hat Enterpris ...

随机推荐

  1. iOS KVC详细讲解

    iOS KVC详细讲解 什么是KVC? KVC即NSKeyValueCoding,就是键-值编码的意思.一个非正式的 Protocol,是一种间接访问对象的属性使用字符串来标识属性,而不是通过调用存取 ...

  2. 自定义可视化调试工具(Microsoft.VisualStudio.DebuggerVisualizers)vs.net开发工具

    背景: 话说:使用CYQ.Data时,会经常断点MDataTable的对象,为了查看表格的数据内容,在监视里会常ToDataTable(),然后借可DataTable的可视化方式查看表格. 近日:心中 ...

  3. LAMP配置虚拟目录

    1.  httpd.conf中添加 Listen 81 2. 1 <VirtualHost 127.0.0.2:81> 2 DocumentRoot E:\ws\2011\DiscuzSp ...

  4. WPF学习之路(十)实例:用户注册

    通过一个注册用户的实例了解页面间数据的传递 首先构建一个User类  User.cs public class User { private string name; public string Na ...

  5. 天书笔记:如何创建一个现代的footer(页脚)

    此笔记纯属本人脑残笔记,阅读困难不理解属正常现象,初学者尽量不要阅读,否则轻则口吐白沫重则走火入魔,切记切记 老规矩,效果图 这个布局也是从b站看到的,回来自己实现了一遍 HTML: <div ...

  6. ORACLE查看数据文件包含哪些对象

    在上篇ORACLE查看表空间对象中,我介绍了如何查询一个表空间有那些数据库对象,那么我们是否可以查看某个数据文件包含那些数据库对象呢?如下所示 SELECT  E.SEGMENT_TYPE       ...

  7. HTML的基本代码第一课

    打开DREAMWEAVER,新建HTML,如下图: 其中body的属性: bgcolor---页面背景颜色 text--文字颜色 topmargin--上页边距 leftmargin--左叶边距 ri ...

  8. Validation failed for one or more entities. See ‘EntityValidationErrors’解决方法

    Validation failed for one or more entities. See ‘EntityValidationErrors’解决方法 You can extract all the ...

  9. file

    用来测试文件类型 $file [] filename -b列出辨识结果时,但不显示文件名称 -L如果文件是符号链接,那么直接解读其指向的文件 -z:如果文件是压缩文件,尝试去解读压缩文件的内容 $fi ...

  10. dpkg

    dpkg是debian最早提出的一个软件包管理工具,因为早期并没有考虑到当下软件包之间这么复杂的依赖关系,所以并不能自动解决软件包的依赖问题,这个命令多用于安装本地的.deb软件包,也可以进行软件包的 ...