mysql安装启动 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
首次安装mysql 启动 mysql -uroot 以下错误:
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
解决方案:
vim /etc/my.cnf
在[mysqld] 部分添加以下一行。
skip-grant-tables
重启mysql服务
systemctl restart mysqld.service
修改mysql密码
mysql> update user set authentication_string = password("XX@123") where user='root';
Query OK, row affected, warning (0.00 sec)
Rows matched: Changed: Warnings:
退出mysql, 把之前/etc/my.cnf文件中skip-grant-tables 注释掉。
重启mysql服务
进入mysql服务
mysql> SET PASSWORD = PASSWORD('XX@123');
Query OK, rows affected, warning (0.01 sec)
mysql安装启动 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)的更多相关文章
- win10连接mysql提示:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
win10中cmd连接mysql提示:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YE ...
- 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) Enter password: E ...
- mysql登录遇到ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
执行mysql -uroot -p,出现如下问题 ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using pass ...
- Linux下mysql出错:ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
安装: 1.新开的云服务器,需要检测系统是否自带安装mysql # yum list installed | grep mysql 2.如果发现有系统自带mysql,果断这么干 # yum -y re ...
- CentOS 7.6下解决登录MySQL时,ERROR 1045 (28000): Access denied for user root@localhost (using password: YES
https://blog.csdn.net/sinat_35406909/article/details/79763782
- MySQL ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)的真正原因
在博客Linux mysql 5.6: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: N ...
- MySQL密码正确却无法本地登录,ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
MySQL密码正确却无法本地登录 报错如下: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password ...
- 升级到macOS 10.12 mysqlb报错ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
系统升级到macOS 10.12后启动mysql后,在终端输入mysql 报错ERROR 1045 (28000): Access denied for user 'root'@'localhost' ...
- 安装mysql因为/tmp权限不足而导致ERROR 1045 (28000): Access denied for user root@localhost (using password: NO)的解决方案
本机是centos 6.5 安装的mysql是5.1的版本. 在安装mysql之后,第一次启动mysql服务的时候,需要/tmp有777(rwxrwxrwx)的权限,然而楼主的/tmp是755(rw ...
随机推荐
- smarty类与对象的赋值与使用
<?phprequire_once('../smarty/Smarty.class.php'); //配置信息$smarty=new Smarty(); $smarty->left_del ...
- iBeacon的第一篇(基于Swift实现)
低功耗蓝牙技术现在几乎是只能手机的标配.随着这一技术的发展,苹果在2013年WWDC大会上,苹果推出iBeacon技术.该技术允许开发人员开发能够使用iBeacon硬件传感器的iOS应用程序,来为相应 ...
- 【图解HTTP】第一章 了解web及网络基础
[图解HTTP]了解Web及网络基础 Web页面是如何呈现的?根据Web浏览器地址栏中指定的URL,Web浏览器从Web服务器端获取文件资源(resource)等信息,从而显示出Web页面. 这种通过 ...
- Linux Crontab 任务管理工具命令以及示例
Crontab 是 Linux 平台下的一款用于循环执行例行任务的工具,Linux 系统由 cron (crond) 这个系统服务来控制任务 , Linux系统本来就有很多的计划任务需要启动 , 所以 ...
- poj—1753 (DFS+枚举)
...
- JavaScript - this详解 (三)
闭包 this 执行上下文决定了变量作用域 而闭包,它其实是一种决策,是一种模式,让我们可以灵活的改变变量作用域. 按惯例,上栗子 var global = 'global';function out ...
- javascript高级程序设计读书笔记----事件
DOM0级事件处理程序 传统处理方式,即讲一个函数赋值给一个事件处理程序属性. DOM2级事件处理程序 addEventListener()和removeHandler()两个方法用于指定和删 ...
- 使用ContentPresenter,不使用ContentControl
参考: https://wpf.2000things.com/2017/04/06/1204-using-a-datatrigger-to-change-content-in-a-contentpre ...
- 疑难杂症--已停止运行DBCC造成阻塞
场景数据库因非法断电导致出现分配页上不一致,运行完DBCC CHECKDB后出现以下错误: 表错误: 表 't_pc_id' (ID 277576027).数据行在索引 'last_login_dat ...
- jquery-tmpl 插件
做项目时页面上有处功能是:在页面有处列表.有添加,我添加修改或删除后要刷新这个列表,首先想到的是局部刷新,但我们一般说的局部刷新就是利于ajax去后台调用数据并显示,而这里是一整个列表就比较麻烦了,刷 ...