centos7 mysql5.7 免密码登陆
来源:互联网 发布:linux dd iso u盘 编辑:程序博客网 时间:2024/05/22 02:00
1:进入root下:
su
密码:
2:在root下编辑
mysql_config_editor set --login-path=client --host=localhost --user=root --password
Enter password:
3:输入
pwd
在/root下生 .mylogin.cnf乱码文件
[nanfengpo@master ~]$ su
密码:
[root@master nanfengpo]# mysql_config_editor set --login-path=client --host=localhost --user=root --password
Enter password:
[root@master nanfengpo]# pwd
/home/nanfengpo
密码:
[root@master nanfengpo]# mysql_config_editor set --login-path=client --host=localhost --user=root --password
Enter password:
[root@master nanfengpo]# pwd
/home/nanfengpo
4:查看该文件
[root@master ~]# cat .mylogin.cnf
#��8x!~��(��-��3�P��{�x�^� m�z�\��+1�$�$>� ^�<��^s�E'� 7�<
���u��љC먚-X��װ���>�@Lg[root@master ~]#
#��8x!~��(��-��3�P��{�x�^� m�z�\��+1�$�$>� ^�<��^s�E'� 7�<
���u��љC먚-X��װ���>�@Lg[root@master ~]#
5:直接输入mysql --login-path=client进行登陆mysql
[root@master nanfengpo]# mysql --login-path=client
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 23
Server version: 5.7.19 MySQL Community Server (GPL)
Copyright (c) 2000, 2017, 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>
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 23
Server version: 5.7.19 MySQL Community Server (GPL)
Copyright (c) 2000, 2017, 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
- centos7 mysql5.7 免密码登陆
- CentOS7配置免密码登陆
- CentOS7免密码SSH登陆
- CentOS7配置免密码登陆
- centos7配置SSH免密码登陆
- MySQL5.7免密重置root密码
- SSH登陆免密码
- ssh免密码登陆
- ssh 免密码登陆
- ssh免密码登陆
- ssh免密码登陆
- ssh免密码登陆
- ssh 免密码登陆
- ssh 免密码登陆
- ssh 免密码登陆
- ssh免密码登陆
- ssh免密码登陆
- ssh免密码登陆
- py学习之路
- Power Strings next数组应用
- 整理关于java开发工具使用过程中一些小技巧来提高开发效率
- 关于numpy mean函数和var函数用法
- 面试小结
- centos7 mysql5.7 免密码登陆
- js将form表单提交数据封装为ajax提交
- Python绘图问题:Matplotlib中柱状图bar使用
- Hadoop单节点配置
- Android之Activity
- InteliJ IDEA 设置与快捷键
- 关于unity2017上找不到windows store的问题
- HDOJ 1003 Max Sum
- Git学习总结