mysql8.0 保护登录信息

root@student \~# mysql_config_editor --help

mysql_config_editor Ver 8.0.13 for linux-glibc2.12 on x86_64 (MySQL Community Server - GPL)

Copyright (c) 2012, 2018, 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.

MySQL Configuration Utility.

Usage: mysql_config_editor program options command \[command options]

-#, --debug=# This is a non-debug version. Catch this and exit.

-?, --help Display this help and exit.

-v, --verbose Write more information.

-V, --version Output version information and exit.

Variables (--variable-name=value)

and boolean options {FALSE|TRUE} Value (after reading options)


verbose FALSE

Where command can be any one of the following :

set command options Sets user name/password/host name/socket/port

for a given login path (section).

remove command options Remove a login path from the login file.

print command options Print all the options for a specified

login path.

reset command options Deletes the contents of the login file.

help Display this usage/help information.

root@student \~# mysql_config_editor set --login_path=client --user=root --password --host=localhost --port=3306

Enter password:

会在当前用户HOME文件夹下创建 一个隐藏二进制文件

root@student \~# ls -al .mylogin.cnf

-rw------- 1 root root 156 Oct 12 21:37 .mylogin.cnf

root@student \~#

root@student \~# mysql

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 18

Server version: 8.0.13 MySQL Community Server - GPL

Copyright (c) 2000, 2018, 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>

相关推荐
名不经传的养虾人5 分钟前
从0到1:企业级AI项目迭代日记 Vol.61|记忆不是越多越好,装一道门比装满更重要
数据库·人工智能·ai编程·ai工作流·企业ai
霸道流氓气质29 分钟前
Harness Engineering 从理论到实战:基于 Spring AI Alibaba 的完整实现指南
数据库·人工智能·spring·harness
linuxoffer31 分钟前
MYSQL回收碎片空间
数据库·mysql
名字还没想好☜1 小时前
Go 并发实战:用 channel 实现 worker pool
java·数据库·后端·golang·go
万亿少女的梦1681 小时前
基于Spring Boot与Vue的繁星技术论坛系统设计与实现
java·spring boot·mysql·vue·系统设计
源图客1 小时前
Claude Code基础使用
服务器·前端·数据库
阿里云大数据AI技术10 小时前
Hologres AI Function 文本分类实战:从提示词设计到 KV-Cache 调优,全程 SQL 搞定
人工智能·sql
白帽小丑11 小时前
# 一次 MySQL DELETE 误操作的数据恢复尝试实录
数据库·mysql
Dxy123931021612 小时前
MySQL索引完整教程:创建、查看、修改、删除与日常管理
前端·javascript·mysql