ITPub博客

首页 > 数据库 > MySQL > mysql_config_editor

mysql_config_editor

原创 MySQL 作者:mhabbyo 时间:2017-03-03 16:04:41 0 删除 编辑
## 输入密码  不会在终端系那是
[mysql@test_test_master ~]$ mysql_config_editor set --login-path=test --user=root --password -S /h*****mysql.sock
Enter password: 


[mysql@centos ~]$ ll .mylogin.cnf
-rw-------. 1 mysql dba 152 Mar  3 08:09 .mylogin.cnf

##制定路径进行登录
[mysql@test_test_master ~]$ mysql --login-path=xhh
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 590079
Server version: 5.7.15-9-log Source distribution

Copyright (c) 2009-2016 Percona LLC and/or its affiliates
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> Bye

## 打印所有的登录路径信息
 mysql_config_editor print --all
 
[login]
user = root
password = *****
host = localhost
socket = /home/mysql/my3306/run/mysql.sock


## 删除其中一个设置
mysql_config_editor remove --login-path=test


## 清除所有的密码设置
 mysql_config_editor reset

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29291882/viewspace-2134674/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: linux 内核参数
请登录后发表评论 登录
全部评论

注册时间:2013-12-23

  • 博文量
    56
  • 访问量
    136412