修改mysql数据库登陆用户的密码
2014-02-27 09:28
351 查看
命令行进入mysql:
首先确认环境变量里面有如下配置:C:\Program Files\MySQL\MySQL Server 5.5\bin
才能在进入黑窗口直接适用mysql命令,否则需要在黑窗口进入mysql的bin目录在执行mysql命令.
使用 root 和123456登陆:
C:\Documents and Settings\Administrator>mysql -u root -p
Enter password: ******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 25
Server version: 5.5.19 MySQL Community Server (GPL)
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
===========================================================
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| dmp |
| hdmp |
| hms |
| mysql |
| ods_produce |
| performance_schema |
| test |
| wms |
+--------------------+
9 rows in set (0.02 sec)
mysql> use mysql;
Database changed
mysql> update user set password=PASSWORD("123456") WHERE user='root'
======================================================
mysql数据库文件默认存放路径:C:\Documents and Settings\All Users\Application Data\MySQL\MySQL Server 5.5\data
首先确认环境变量里面有如下配置:C:\Program Files\MySQL\MySQL Server 5.5\bin
才能在进入黑窗口直接适用mysql命令,否则需要在黑窗口进入mysql的bin目录在执行mysql命令.
使用 root 和123456登陆:
C:\Documents and Settings\Administrator>mysql -u root -p
Enter password: ******
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 25
Server version: 5.5.19 MySQL Community Server (GPL)
Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql>
===========================================================
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| dmp |
| hdmp |
| hms |
| mysql |
| ods_produce |
| performance_schema |
| test |
| wms |
+--------------------+
9 rows in set (0.02 sec)
mysql> use mysql;
Database changed
mysql> update user set password=PASSWORD("123456") WHERE user='root'
mysql> FLUSH PRIVILEGES; mysql> QUIT
======================================================
mysql数据库文件默认存放路径:C:\Documents and Settings\All Users\Application Data\MySQL\MySQL Server 5.5\data
相关文章推荐
- linux下安装mysql数据库5.6源码安装,修改登录用户密码
- 使用phpMyAdmin修改MySQL数据库root用户密码的方法
- mysql数据库修改密码无法登陆问题
- wampserver修改mysql数据库密码后phpMyAdmin无法登陆
- MySQL新建用户,授权,删除用户,修改密码,远程登陆,亲测可行
- mysql数据库root用户密码忘记进行修改的办法
- 在liferay中禁用新用户首次登陆需要修改密码
- Linux下MYSQL数据库忘记密码修改用户密码
- shel脚本批量添加用户,首次登陆强制修改密码
- 6.(Mysql数据管理相关)连接MYSQL,修改密码,增加新用户,数据库相关命令,表操作相关命令,数据相关命令,数据库sql导入和导出,备份数据库,查看不到mysql数据库的解决办法
- 三种方法修改MySQL数据库中一个用户的密码
- Linux(ubuntu)上修改MySQL数据库root用户密码并允许远程机器访问
- linux下强制新用户首次登陆修改密码
- mysql数据库修改用户密码
- SQL server 2005 sa用户无法登陆和sa密码修改
- 修改MySQL数据库root用户密码
- linux下,mysql数据库的忘记密码,查看用户,以及修改用户信息
- 控制台修改mysql数据库root登陆密码
- 【python】if 条件判断 +字符串的{}填空+(一个用户登陆及修改密码的例子)
- Linux root用户忘记密码如何登陆 (借图修改,感谢原作者)