Mysql密码修改

来源:互联网 发布:archlinux网络配置 编辑:程序博客网 时间:2024/05/16 08:23

登录

root@localhost:~# mysql -u root  -pa1b2c3Welcome to the MySQL monitor.  Commands end with ; or \g.Your MySQL connection id is 45Server version: 5.5.54-0ubuntu0.14.04.1-log (Ubuntu)Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.mysql> 

设置密码

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpass');
0 0
原创粉丝点击