mysql_config_editor的用法
来源:互联网 发布:淘宝数据采集器破解版 编辑:程序博客网 时间:2024/06/01 08:56
mysql_config_editor命令
我们通常登陆mysql都是用如下命令登陆,命令很长而且密码如果超级复杂的话,每次登陆还要输入密码;复杂的密码不仅难记,还容易输错,非常蛋疼 mysql_config_editor这个命令就为我们解决了这一蛋疼的问题
正常登陆方法: mysql -uroot -p -S /tmp/mysql3306.sock
1.生成一个mylogin.cnf文件
[root@zw-test-db /]# mysql_config_editor set --login-path=my3306 --user=root --socket=/tmp/mysql3306.sock --password
Enter password:
[root@zw-test-db mysql]# cat ~/.mylogin.cnf
^@^@^@^@^]^E^\^M^]^X^Z^O^A^W^D^A^A^W^C^L^Z^Q^V^O^P^@^@^@E8¼é$Go¾Ò^]<99>
SgO^P^@^@^@ÏC:@}w½öètËíRÁWK ^@^@^@^A"p9<86>^\+ñ7GìÞ<80>ZP<9a>¾tLÆø<86>·<34<81>þe<91>^T ^@^@^@p} Qý1ÛÀk<86>b!<96>ªP^Rå<87>^_Õ~åºt <89>÷á|Ü<82>²
可以看到一串加密的文件
2.打印一下生成文件的内容
[root@zw-test-db ~]# mysql_config_editor print --all
[my3306]
user = root
password = *****
socket = /tmp/mysql3306.sock
3. 用加密文件登陆
[root@zw-test-db ~]# mysql --login-path=my3306
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.14-log MySQL Community Server (GPL)
Copyright (c) 2000, 2016, 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>
以后登陆就不用输入超长的密码啦!
0 0
- mysql_config_editor的用法
- mysql_config_editor
- mysql_config_editor 加密用户的密码
- mysql_config_editor工具
- mysql_config_editor使用测试
- mysql_config_editor/login-path使用
- 玩转MySQL之mysql_config_editor工具
- mysql_config_editor实现mysql无密码登录
- ?的用法
- ?的用法
- ---" ~ " 的用法---
- ---" ~ " 的用法---
- ~ 的用法
- 的用法
- ##的用法
- ##的用法
- 的用法
- ${ }的用法
- dl插件框架 - 《Andriod必备技能》
- javaSE javaEE javaME的区别
- ExtJs中Radio和radiogroup获取值
- php数组下标不为不连续的数字的问题
- C++拷贝构造函数的使用时机 笔试题
- mysql_config_editor的用法
- 利用ServletContextListener 获取spring上下文
- GeometryService方法研究之intersect
- volley工具包的第二种简介的方法
- Algorithm, Part I Princeton University 公开课第一周 Introduction
- Java设计模式—观察者模式
- 浏览器渲染页面过程描述,DOM编程技巧以及重排和重绘
- 早上发的可编辑ListView的Demo已经整理出来了
- 1004. 成绩排名 (20)