Home  >  Article  >  Database  >  MySQL添加用户时的错误问题

MySQL添加用户时的错误问题

WBOY
WBOYOriginal
2016-06-07 16:45:41935browse

MySQL添加用户时的错误问题解决 例如:添加用户 insert into mysql.user(Host,User,Password) values(localhost,test,passwo

MySQL添加用户时的错误问题解决

例如:添加用户

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,,这样就添加了一个新的用户,不会出以上的错误了。

--------------------------------------分割线 --------------------------------------

Ubuntu 14.04下安装MySQL

《MySQL权威指南(原书第2版)》清晰中文扫描版 PDF

Ubuntu 14.04 LTS 安装 LNMP Nginx\PHP5 (PHP-FPM)\MySQL

Ubuntu 14.04下搭建MySQL主从服务器

Ubuntu 12.04 LTS 构建高可用分布式 MySQL 集群

Ubuntu 12.04下源代码安装MySQL5.6以及Python-MySQLdb

MySQL-5.5.38通用二进制安装

--------------------------------------分割线 --------------------------------------

本文永久更新链接地址:

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