美文网首页
python mysql创建数据遇到的问题集合

python mysql创建数据遇到的问题集合

作者: HopCoder | 来源:发表于2017-09-22 21:44 被阅读0次

    1、终端登陆mysql Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
    执行命令 mysql -u root -p
    如果设置了密码就输密码,没有设置就直接enter

    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
    

    说明你的mysql server没有启动

    DsHdeMacBook-Pro:~ dsh$ mysql.server start
    Starting MySQL
    . SUCCESS! 
    

    重新执行 mysql -u root -p

    DsHdeMacBook-Pro:~ dsh$ mysql -uroot -p
    Enter password: 
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 3
    Server version: 5.7.19 Homebrew
    
    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.````

    相关文章

      网友评论

          本文标题:python mysql创建数据遇到的问题集合

          本文链接:https://www.haomeiwen.com/subject/kshqextx.html