返回顶部

mysql - 2种连接mysql服务端的方式

  1. 本地端:通过socket方式连接
    1. eg:
      mysql -uroot -P3306 -S /tmp/mysql.sock

       注意:user=root, 必须在权限表中已存在

  2. 远程连接:通过TCP/IP方式连接:
    1. eg:
      mysql -uroot -p123 -P3306 -hlocalhost

       

posted @ 2021-01-14 20:33  Be-myself  阅读(218)  评论(0编辑  收藏  举报
levels of contents 点击查看具体代码内容