PHP里用户密码的回复和管理
1). In /etc/my.ini, add
skip-grant-tables
2). mysql -u root -p (no password required)
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| cacti |
| gfxpv_database |
| mysql |
| test |
+--------------------+
5 rows in set (0.08 sec)
3). select cacti database
mysql> use cacti;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
4). show all tables in cacti database
mysql> show tables;
+---------------------------+
| Tables_in_cacti |
+---------------------------+
| cdef |
| cdef_items |
| colors |
| data_input |
| data_input_data |
| data_input_fields |
| data_local |
| data_template |
| data_template_data |
| data_template_data_rra |
| data_template_rrd |
| graph_local |
| graph_template_input |
| graph_template_input_defs |
| graph_templates |
| graph_templates_gprint |
| graph_templates_graph |
| graph_templates_item |
| graph_tree |
| graph_tree_items |
| host |
| host_graph |
| host_snmp_cache |
| host_snmp_query |
| host_template |
| host_template_graph |
| host_template_snmp_query |
| plugin_config |
| plugin_db_changes |
| plugin_hooks |
| plugin_realms |
| poller |
| poller_command |
| poller_item |
| poller_output |
| poller_reindex |
| poller_time |
| rra |
| rra_cf |
| settings |
| settings_graphs |
| settings_tree |
| snmp_query |
| snmp_query_graph |
| snmp_query_graph_rrd |
| snmp_query_graph_rrd_sv |
| snmp_query_graph_sv |
| user_auth |
| user_auth_perms |
| user_auth_realm |
| user_log |
| version |
+---------------------------+
52 rows in set (0.00 sec)
5). select all user in the user_auth table(cacti database)
mysql> select * from user_auth;
+----+----------+----------------------------------+-------+---------------+----------------------+-----------+-----------+--------------+----------------+------------+---------------+--------------+--------------+------------------------+---------+
| id | username | password | realm | full_name | must_change_password | show_tree | show_list | show_preview | graph_settings | login_opts | policy_graphs | policy_trees | policy_hosts | policy_graph_templates | enabled |
+----+----------+----------------------------------+-------+---------------+----------------------+-----------+-----------+--------------+----------------+------------+---------------+--------------+--------------+------------------------+---------+
| 1 | admin | e10adc3949ba59abbe56e057f20f883e | 0 | Administrator | | on | on | on | on | 1 | 1 | 1 | 1 | 1 | on |
| 3 | guest | 43e9a4ab75570f5b | 0 | Guest Account | on | on | on | on | on | 3 | 1 | 1 | 1 | 1 | |
+----+----------+----------------------------------+-------+---------------+----------------------+-----------+-----------+--------------+----------------+------------+---------------+--------------+--------------+------------------------+---------+
2 rows in set (0.00 sec)
6). update "guest" account with password "guest"
mysql> update user_auth set password=PASSWORD('guest') where username='guest';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
mysql> update user_auth set password=PASSWORD('admin') where username='admin';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1 Changed: 1 Warnings: 0
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)
still not working!!!!!!!!!!!!!!!!!
PHP里用户密码的回复和管理的更多相关文章
- Linux 用户和用户组管理之 修改用户名和用户组;修改用户密码
一.用户账号包括(查看已经存在的账号 | 添加用户账号 | 修改用户账号 | 删除用户账号) 查看存在的账号: more /etc/passwd #或者是 awk -F':' '{ print $1 ...
- RDIFramework.NET ━ .NET快速信息化系统开发框架 V3.2->用户管理模块新增“重置用户密码”功能
不管是什么系统登录用户都有忘记密码的时候,忘记密码就进入不了系统.系统应该可以提供重置用户密码的功能.在我们框架中重置用户密码功能一般用用户管理员来完成.当然如果做得复杂点还可以由用户自己来重置(如: ...
- usermod命令/用户密码管理/mkpasswd命令
3.4 usermod命令 3.5 用户密码管理 3.6 mkpasswd命令 usermod命令 设置用户uid: usermod -u 111 username 设置用户gid usermod ...
- usermod命令、用户密码管理、mkpasswd命令
3.4 usermod命令--更改用户帐户属性 -a|--append ##把用户追加到某些组中,仅与-G选项一起使用 -G|--groups ##把用户追加到某些组中,仅与-a选项一起使用:把该用户 ...
- usermod命令、用户密码管理、mkpasswd命令 使用介绍
第3周第2次课(4月3日) 课程内容:3.4 usermod命令3.5 用户密码管理3.6 mkpasswd命令 3.4 usermod命令 usermod可以修改用户的UID和GID 命令使用格式: ...
- linux用户的基本操作2 用户密码管理
目录 linux系统的基本用户操作2 用户的扩展知识 用户密码管理 linux系统的基本用户操作2 3)使用userdel删除账户 语法 : userdel [-r] username -r 同时删除 ...
- Linux CentOS7 VMware usermod命令、用户密码管理、mkpasswd命令
一. usermod命令 usermod可用来修改用户帐号的各项设定 -c, --comment 注释 GECOS 字段的新值 -d, --home HOME_DIR 用户的新主目录 -e, --ex ...
- Linux CentOS7 VMware linux和windows互传文件、用户配置文件和密码配置文件、用户组管理、用户管理
一. linux和windows互传文件 X-shell.Securecrt远程终端,与Windows之间互传文件. 安装一个工具lrzsz [root@davery ~]# yum install ...
- linux和windows互传文件、用户配置文件和密码配置文件、用户组管理、用户管理...
linux和windows互传文件 第一种:在linux主机上下载lrzsz软件包 1.yum install lrzsz 2.通过rz命令上传window的文件到linux主机上 用过sz 文件名下 ...
随机推荐
- 消息队列入门(三)JMS标准及实现
>>消息中间件 消息中间件即Message-oriented middleware(MOM),消息中间件利用高效可靠的消息传递机制进行平台无关的数据交流,并基于数据通信来进行分布式系统的集 ...
- jquery easy ui 1.3.4 布局layout(4)
4.1.easyui布局-layout 在easyui里面只有一种布局方式,layout(东.南.西.北.中)的布局方式,创建layout布局的方式如下: <div id="cc&qu ...
- ytu 1937:查找最大元素(水题)
查找最大元素 Time Limit: 1 Sec Memory Limit: 64 MBSubmit: 51 Solved: 23[Submit][Status][Web Board] Descr ...
- CC2540开发板学习笔记(四)——定时器
一.实验内容 分别使用定时器T1和T3使得LED周期性闪烁 二.实验过程 1.定时器T1(查询IRCON来控制) (1)需要调配的寄存器 T1CTL(0XE4) Timer1控制寄存器 BIT3, ...
- C++primer学习笔记(四)——Chapter 6
6.1 Function Basics 一.函数的构造 type functionName( parameters list) statement 1.首先格式如上,一个函数一定要有返回值的类型ty ...
- 输入框提示文字js
<input style="margin-right: 0px; padding-right: 0px;" class="text" required=& ...
- 下拉更新列表Android-PullToRefresh
项目地址:https://github.com/chrisbanes/Android-PullToRefresh
- [hive小技巧]同一份数据多种处理
其实就是from表时,可以插入到多个表. sql语句的模板如下: from history insert overwrite sales select * where actino='purchase ...
- 简单几何(凸包) POJ 2187 Beauty Contest
题目传送门 题意:求两点的距离平方的最大值 分析:凸包模板题 /************************************************ * Author :Running_T ...
- HDU4081 Qin Shi Huang's National Road System(次小生成树)
枚举作为magic road的边,然后求出A/B. A/B得在大概O(1)的时间复杂度求出,关键是B,B是包含magic road的最小生成树. 这么求得: 先在原图求MST,边总和记为s,顺便求出M ...