mysql> use mysql; Database changed mysql> updata user set password='1234' where user='root';
mysql>usemysql;Databasechangedmysql>updatausersetpassword='1234'whereuser='root';ERRO...
mysql> use mysql;
Database changed
mysql> updata user set password='1234' where user='root';
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 'updat
a user set password='1234' where user='root'' at line 1
mysql> updata users set password='1234' where user='root';
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 'updat
a users set password='1234' where user='root'' at line 1
mysql> 展开
Database changed
mysql> updata user set password='1234' where user='root';
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 'updat
a user set password='1234' where user='root'' at line 1
mysql> updata users set password='1234' where user='root';
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 'updat
a users set password='1234' where user='root'' at line 1
mysql> 展开
5个回答
展开全部
语法错误,应该这样写:
mysql>update user set password=password("new_pass") where user="root";
你的少了一个password加密函数。
谢谢!
mysql>update user set password=password("new_pass") where user="root";
你的少了一个password加密函数。
谢谢!
追问
updata user set password=passworld('1234') where user='root'; 也错了啊
追答
你追问的命令是你复制的吗 ?是不是你的update写错误了啊
update user set password=password("new_pass") where user="root";
参考下面的文章看看
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐于2021-01-05
展开全部
更新语句的命令是 UPDATE
不是 updata
拼写错误啊.
MySQL
修改当前登录用户的密码: (也就是修改自己的密码)
mysql> SET PASSWORD = PASSWORD('test');
Query OK, 0 rows affected (0.00 sec)
mysql> select host, user, password from mysql.user;
+-----------+------+-------------------------------------------+
| host | user | password |
+-----------+------+-------------------------------------------+
| localhost | root | |
| localhost | | *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 |
+-----------+------+-------------------------------------------+
2 rows in set (0.00 sec)
要想更改已有账户的密码,使用UPDATE来设置Password列值:
shell> mysql -u root mysql
mysql> UPDATE user SET Password = PASSWORD('bagel')
-> WHERE Host = '%' AND User = 'francis';
mysql> FLUSH PRIVILEGES;
不是 updata
拼写错误啊.
MySQL
修改当前登录用户的密码: (也就是修改自己的密码)
mysql> SET PASSWORD = PASSWORD('test');
Query OK, 0 rows affected (0.00 sec)
mysql> select host, user, password from mysql.user;
+-----------+------+-------------------------------------------+
| host | user | password |
+-----------+------+-------------------------------------------+
| localhost | root | |
| localhost | | *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 |
+-----------+------+-------------------------------------------+
2 rows in set (0.00 sec)
要想更改已有账户的密码,使用UPDATE来设置Password列值:
shell> mysql -u root mysql
mysql> UPDATE user SET Password = PASSWORD('bagel')
-> WHERE Host = '%' AND User = 'francis';
mysql> FLUSH PRIVILEGES;
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
updata user set password='1234' where user='root';
改成
update user set password='1234' where user='root';
或者
update user set password=old_password('1234') where user='root';
或者
update user set password=password('1234') where user='root';
改成
update user set password='1234' where user='root';
或者
update user set password=old_password('1234') where user='root';
或者
update user set password=password('1234') where user='root';
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
亲是update 不是updata啊
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
update 不是updata
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |