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>

相关推荐
zt1985q19 分钟前
本地部署开源网络书签与内容管理工具 Karakeep 并实现外部访问
运维·服务器·网络·数据库·网络协议·开源
IvorySQL1 小时前
PostgreSQL 日报| PostgreSQL 19 默认 WAL 压缩算法(8 月 8 日)
数据库·postgresql·区块链
油丶酸萝卜别吃2 小时前
MySQL B+ 树查询全过程详解
数据库·mysql
leisoo80972 小时前
股票数据本地化存储实战:JSON、数据库与列式存储的方案对比
jvm·数据库·json
Exclusive_Cat2 小时前
MySQL回表机制解析与优化策略
数据库·sql
Cry丶2 小时前
遗留系统数据迁移实战(九):区域编码迁移与补偿接口设计
mysql·数据治理·数据迁移·区域编码·补偿接口·组织区域
circuitsosk2 小时前
向量数据库选型与性能压测:Milvus、Pinecone、Chroma在真实业务下的对比
数据库·python·pinecone·milvus·向量数据库·chroma
影寂ldy2 小时前
SQL 索引(Index)完整笔记
数据库·笔记·sql
切糕师学AI2 小时前
从压缩到查询:PostgreSQL中JSON数据的存储与处理实践
数据库·postgresql·json
渣渣盟2 小时前
当 Redis 写入成为性能瓶颈时,如何利用 异步批量 Sink 将吞吐量从 1w QPS 提升到 10w+?
数据库·redis·php