Home > Database > Mysql Tutorial > body text

MySQL ERROR 1044 (42000) 解决方法

WBOY
Release: 2016-06-07 17:29:18
Original
3260 people have browsed it

场景重现: 我在本机上安装的是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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!