Home  >  Article  >  Database  >  MySQL ERROR 1044 (42000) 解决方法

MySQL ERROR 1044 (42000) 解决方法

WBOY
WBOYOriginal
2016-06-07 17:29:183261browse

场景重现: 我在本机上安装的是MySQL5.x,昨天晚上犯二了,直接做了如下操作: 在Terminal中输入 mysql 进入到数据库命令行,然后

场景重现:

我在本机上安装的是MySQL5.x,昨天晚上犯二了,直接做了如下操作:

在Terminal中输入 mysql 进入到数据库命令行,然后直接:

CREATE DATABASE IF NOT EXISTS yuntu;

结果出现如下错误:

ERROR 1044 (42000): Access denied for user ''@'localhost' to database 'yuntu‘。

解决途径:

退出。

mysql -u root -p

Enter password:

显示--Welcome to the MySQL monitor. 再次新建数据库,一切OK。

就这么扯淡细节。

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn