Home > Database > Mysql Tutorial > Mysql添加用户时的错误问题_MySQL

Mysql添加用户时的错误问题_MySQL

WBOY
Release: 2016-06-01 13:04:17
Original
1003 people have browsed it

例如:添加用户

insert into mysql.user(Host,User,Password) values("localhost","test",password("1234"));

报出:以下的错误

ERROR 1364 (HY000): Field 'ssl_cipher' doesn't have a default value错误

mysql5.1以上版本,我是在5.6版本上操作的。

正确的方法:可以用下面的命令:

GRANT USAGE ON *.* TO 'user01'@'localhost' IDENTIFIED BY '123456' WITH GRANT OPTION;

用户:user01,密码:123456,这样就添加了一个新的用户,不会出以上的错误了。

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