时间:2021-07-01 10:21:17 帮助过:30人阅读
mysql -uroot -p123456 -P3308
mysql -uroot -p123456 -P3308 -h127.0.0.1
这2中链接方式有区别吗?
strace mysql -uroot -p123456 -P3308 得到如下结果
stat("/etc/my.cnf", 0x7fff2b1fe5a0) = -1 ENOENT (No such file or directory)
stat("/etc/mysql/my.cnf", 0x7fff2b1fe5a0) = -1 ENOENT (No such file or directory)
stat("/home/work/mysql/etc/my.cnf", {st_mode=S_IFREG|0644, st_size=20538, ...}) = 0
open("/home/work/mysql/etc/my.cnf", O_RDONLY) = 3
表示-h -P 参数没有一起使用的话,-P参数相当于没写
mysql -uroot -p123456 -P3308 -h127.0.0.1 才是真正的连接3308端口
mysql客户端踩坑
标签:my.cnf 连接 没有 size direct work only pen stat