zoukankan      html  css  js  c++  java
  • Xampp使用mysql命令提示Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock'

    lizhangqu@lizhangqu-Inspiron-3421:~$ mysql -h localhost -u root -p
    Enter password: 
    ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
    lizhangqu@lizhangqu-Inspiron-3421:~$ 
    <pre name="code" class="html">以上命令的路径默认为linux系统附带的mysql路径,故出现以上问题( '/var/run/mysqld/mysqld.sock'实际上是系统附带的mysql套接字端口的路径)

    
    



    lizhangqu@lizhangqu-Inspiron-3421:~$ /opt/lampp/bin/mysql -h localhost -u root -p
    Enter password: 
    Welcome to the MySQL monitor.  Commands end with ; or g.
    Your MySQL connection id is 2
    Server version: 5.6.20 Source distribution
    
    Copyright (c) 2000, 2014, 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> 
    


  • 相关阅读:
    Session
    python内存优化机制中的小秘密
    跨域请求
    Cookie
    json
    Python深浅拷贝辨析
    Django form组件相关
    Python 中的 if __name__ == '__main__'
    online_judge_1108
    online_judge_1107
  • 原文地址:https://www.cnblogs.com/lizhangqu/p/4234564.html
Copyright © 2011-2022 走看看