ERROR 1045 (28000): Access denied for user \'\'@\'localhost\' (using password: NO)
来源:互联网 发布:股市趋势技术分析知乎 编辑:程序博客网 时间:2024/06/05 23:51
mysql使用grant命令时报该错误,原因是:未用root用户及密码登陆。
C:\Program Files\MySQL\MySQL Server 5.1\bin>mysql -uroot -p
Enter password: ******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 23626
Server version: 5.1.62-community MySQL Community Server (GPL)
Copyright (c) 2000, 2011, 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> GRANT ALL PRIVILEGES
-> ON *.*
-> TO 'lumeng'@'localhost' IDENTIFIED BY 'lumeng1'
-> WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)
Grant可以把指定的权限分配给特定的用户,如果这个用户不存在,则会创建一个用户
命令格式
grant 权限 on 数据库名.表名 to 用户名@登陆方式 identified by 'password1';
grant select,insert,update,delete on auth.* to user1@localhost identified by 'password';
权 限:select,insert,update,delete,drop,index,all,privileges(表示赋予用户全部权限跟all一样)
数据库 :当数据库名称.表名称被*.*代替,表示用户拥有操作mysql上所有数据库所有表的权限
登陆方式:即用户地址,可以是localhost,也可以是ip地址、机器名字、域名.也可以用'%'表示从任何地址连接,默认为%
'password':可以为空,但是为空这表示只能从本地登陆,建议不能为空
- error: 'Access denied for user 'root'@'localhost' (using password: NO)'
- ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
- ERROR 1045 (28000): Access denied for user root@localhost (using password: no)
- MySQL的启动问题 (ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO))
- mysql-->ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
- ERROR 1045 (28000): Access denied for user 'ODBC'@'localhost' (using password: NO)
- ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
- ERROR 1045 (28000): Access denied for user root@localhost (using password: NO) 的解决办法 ---linux
- ERROR 1045 (28000): Access denied for user ‘root’@'localhost’ (using password: NO)
- ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
- ERROR 1045 (28000): Access denied for user root@localhost (using password: NO)错误解决方法
- ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
- ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
- ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
- ERROR 1045 (28000): Access denied for user root@localhost (using password: NO)
- mysql Error 1045(28000) Access Denied for user 'root'@'localhost' (Using password:NO)
- ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
- [linux][mysql]ERROR 1045 (28000) : Access denied for user 'root'@'localhost' (using password:No)错误
- PHP字符串编码转码iconv与mb_convert_encoding用法和区别
- dede中 Column \'nature\' has duplicated value \'婆婆妈妈\' in
- MYSQL数据库中内容乱码,导入时出错
- DEDE缓存注册类型选择
- dede会员等级说明
- ERROR 1045 (28000): Access denied for user \'\'@\'localhost\' (using password: NO)
- dede排序问题:dede按自己的ID排序
- discuz批量注册马甲
- xmlHttpRequest避免缓存的办法,innerhtml不更新
- css 随滚动条固定浮动position:fixed;
- VPS登录主机上的内容复制到本地计算机
- 零点起飞学HTML+CSS
- 帝国CMS使用方法及模板修改简述
- You probably tried to upload too large file. Please refer to documentation for ways to workaround this limit.