关于mysql修改密码 set password for [email protected] = password('xxx');报错解决方法

当你安装好mysql后,发现mysql -u root -p直接按俩次enter竟然不用密码就能登录进去,可是navicat连接mysql需要密码啊。怎么办?
于是我通过百度寻觅良久发现多数都是通过下面的命令修改。但是自己执行时报下面的错。

mysql> set password for [email protected] = password('123456');
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'passw
ord('123456')' at line 1

后来我通过下面的命令成功修改了密码。
SET PASSWORD FOR [email protected] = ‘123456‘;

mysql> SET PASSWORD FOR [email protected] = '123456';
Query OK, 0 rows affected (0.04 sec)

修改成功。

关于mysql修改密码 set password for [email protected] = password('xxx');报错解决方法

原文地址:https://www.cnblogs.com/jing-tian/p/12231780.html

时间: 2024-08-07 15:36:03

关于mysql修改密码 set password for [email protected] = password('xxx');报错解决方法的相关文章

报错解决方法Error: Can't connect to local MySQL server through socket

Error: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)Errno.: 2002解决方法一:因为你还没有启动mysql,当你启动mysql后,mysql.sock就会自动的生成../bin/safe_mysqld   --user=root   &(这是默认的).如果还没有,就是MYSQL权限没给,或其它原因还有就是 你的mysql是否启动了      启动后一般很难出现这个

安装mysql报错解决方法

报错1: Installing MySQL system tables..../bin/mysqld: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory 解决办法: # yum install libaio* -y 报错2: FATAL ERROR: please install the following Perl module

iview国际化问题(iview官方提供的兼容[email protected]+使用组件报错)

问题描述: 按照iview官方的说法配置i18n发现在使用组件的时候会报错. 兼容 [email protected]+的配置如下图 报错如下图 解决方法: 经过参考element-ui的国际化配置终于解决问题. 解决方法如下图 原文地址:https://www.cnblogs.com/guojikun/p/9146084.html

mysql 修改密码提示ERROR 1819 (HY000): Your password does not satisfy the current policy requirements

为什么会出现ERROR 1819 (HY000): Your password does not satisfy the current policy requirements 这个错误. 原因是因为:mysql5.7 以后数据库安全密码策略需要更改,不能使用简单密码. 如图: ALTER USER 'root'@'localhost' IDENTIFIED BY 'huazai12345'; 解决办法: 1.查询安全策略 输入语句 “ SHOW VARIABLES LIKE 'validate

Kettle使用MySQL作为资源库报错解决方法

使用Kettle5.0.1,安装的是MySQL5.1.JDK1.6,在\data-integration\lib目录里添加mysql的JDBC包mysql-connector-java-5.0.8-bin.jar, 在新建资源库里设置好MySQL的各种信息,如下 点“测试”报如下错误 错误连接数据库 [本地MySQL的[test]数据库] : org.pentaho.di.core.exception.KettleDatabaseException: Error occured while tr

SQLyog恢复数据库报错解决方法【Error Code: 2006 - MySQL server has gone away】

https://blog.csdn.net/niqinwen/article/details/8693044 导入数据库的时候 SQLyog 报错了 Error Code: 2006 – MySQL server has gone away 搜了下,说是max_allowed_packet (MySQL的一个参数)设置的值不够大. 那我改下就行了 嘿嘿 In Windows: In the MySQL server installation directory,in my.ini file, a

安装mysql报错—解决方法:error while loading shared libraries: libssl.so.6

for 32bit ln -sf /usr/lib/libssl.so.10 /usr/lib/libssl.so.6ln -sf /usr/lib/libcrypto.so.10 /usr/lib/libcrypto.so.6 for 64bit ln -sf /usr/lib64/libssl.so.10 /usr/lib64/libssl.so.6ln -sf /usr/lib64/libcrypto.so.10 /usr/lib64/libcrypto.so.6

Table '.\mysql\proc' is marked as crashed and should be repaired 报错

Table '.\MySQL\proc' is marked as crashed and should be repaired 报错 解决方法: 找到mysql的安装目录的bin/myisamchk工具,在命令行中输入: myisamchk -c -r ../data/mysql/proc.MYI 然后myisamchk 工具会帮助你恢复数据表的索引.重新启动mysql,问题解决. Table '.\mysql\proc' is marked as crashed and should be

mysql修改密码方法

1. 修改密码有三种方法:1.1 ---->用mysqladmin修改密码格式:mysqladmin -u用户名 -p旧密码 password 新密码 例子:# mysqladmin -uroot -p123456 password 123 只用mysqladmin的时候,会出现一个warning警告信息: Warning: Using a password on the command line interface can be insecure. 这个没关系,是提示你,你直接在命令窗口下使用