vi ~/.my.cnf
将下边的内容放入上方的文件当中
[client]
host='localhost'
#登录的用户名
user='system'
#用户的密码
password='guan'
2.编辑完成的文件如下图:
[root@master2 ~]# cat ~/.my.cnf
[client]
host='localhost'
#登录的用户名
user='system'
#用户的密码
password='guan'
3.测试
保存后 , 再登录mysql的时候,只需要输入mysql们不需要加后面的用户名和密码
[root@master2 ~]# mysql#后边没有跟用户名和密码
Welcome to the MySQL monitor.Commands end with ; or \g.
Your MySQL connection id is 4
Server version: 5.6.14-log MySQL Community Server (GPL)
Copyright (c) 2000, 2013, 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##可以看到我们已经登陆成功
【mysql本机怎么登陆 mysql怎么用cmd登陆】关于mysql本机怎么登陆和mysql怎么用cmd登陆的介绍到此就结束了,不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站 。
- mysql游标和存储过程是什么 mysql游标表名为变量
- 如何使用cmd命令行提示符登录mysql服务器 cmd中登陆mysql
- mysql怎么设置时区 mysql时间显示设置
- 招聘要精通mysql
- mysql 65535 8192 限制 mysql限制资源使用
- mysql有topn
- mysql协议包解析 mysqlicp协议
- mysql子查询和连接查询 mysql子查询插入
- Mysql使用索引查询 mysql使用round
- 云服务器游戏出现黑屏问题怎么解决? 云服务器游戏黑屏怎么办
