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>

相关推荐
小安运维日记1 小时前
Linux云计算 |【第四阶段】NOSQL-DAY1
linux·运维·redis·sql·云计算·nosql
kejijianwen2 小时前
JdbcTemplate常用方法一览AG网页参数绑定与数据寻址实操
服务器·数据库·oracle
编程零零七3 小时前
Python数据分析工具(三):pymssql的用法
开发语言·前端·数据库·python·oracle·数据分析·pymssql
高兴就好(石6 小时前
DB-GPT部署和试用
数据库·gpt
这孩子叫逆6 小时前
6. 什么是MySQL的事务?如何在Java中使用Connection接口管理事务?
数据库·mysql
Karoku0666 小时前
【网站架构部署与优化】web服务与http协议
linux·运维·服务器·数据库·http·架构
码农郁郁久居人下6 小时前
Redis的配置与优化
数据库·redis·缓存
MuseLss8 小时前
Mycat搭建分库分表
数据库·mycat
Hsu_kk8 小时前
Redis 主从复制配置教程
数据库·redis·缓存
DieSnowK8 小时前
[Redis][环境配置]详细讲解
数据库·redis·分布式·缓存·环境配置·新手向·详细讲解