How can I access the MySQL command line with XAMPP for Windows?

前端 未结 15 2233
甜味超标
甜味超标 2020-11-28 00:54

How can I access the MySQL command line with XAMPP for Windows?

15条回答
  •  迷失自我
    2020-11-28 01:32

    Xampp control panel v2.3.1 I got errors while using -h localhost

    mysql -h localhost -u root

    ERROR 2003 (HY000): Can't connect to MySQL server on 'localhost' (10060) 
    

    So, if you installed xampp as is and did not customize any documentroot, serverroot, etc. then the following works :-

    start both the services on the xampp control panel click shell enter: # mysql -h 127.0.0.1 -u root

    that works just fine. Below is the logtrail:-

    # mysql -h 127.0.0.1 -u root
    Welcome to the MySQL monitor.  Commands end with ; or \g.
    Your MySQL connection id is 1
    Server version: 5.6.21 MySQL Community Server (GPL)
    
    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>
    

提交回复
热议问题