欢迎您访问365答案网,请分享给你的朋友!
生活常识 学习资料

mysql登录遇到ERROR2002:Can‘tconnecttoMySQLserveron‘localhost‘解决办法

时间:2023-08-02

 C:UsersAdministrator>mysql -uroot -proot
            ERROR 2002 (HY000): Can't connect to MySQL server on 'localhost' (10061)
            C:UsersAdministrator>net start mysql
            服务名无效。
            E:MariaDBbin>mysql -u root -p
            Enter password: ****
            ERROR 2002 (HY000): Can't connect to MySQL server on 'localhost' (10061)
            E:MariaDBbin>mysqld -install mysql
            Service successfully installed、       
            E:MariaDBbin>net start mysql
            mysql 服务正在启动 ..
            mysql 服务已经启动成功。
            E:MariaDBbin>mysql -uroot -proot
            Welcome to the MariaDB monitor、 Commands end with ; or g.
            Your MariaDB connection id is 8
            Server version: 10.3.7-MariaDB mariadb.org binary distribution
            Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
            Type 'help;' or 'h' for help、Type 'c' to clear the current input statement.
            MariaDB [(none)]>quit
            Bye
            E:MariaDBbin>c:
            C:UsersAdministrator>mysql -uroot -proot
            Welcome to the MariaDB monitor、 Commands end with ; or g.
            Your MariaDB connection id is 14
            Server version: 10.3.7-MariaDB mariadb.org binary distribution
            Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
            Type 'help;' or 'h' for help、Type 'c' to clear the current input statement.
            MariaDB [(none)]>

Copyright © 2016-2020 www.365daan.com All Rights Reserved. 365答案网 版权所有 备案号:

部分内容来自互联网,版权归原作者所有,如有冒犯请联系我们,我们将在三个工作时内妥善处理。