#2002 cannot log on to the MySQL server

Source: Internet
Author: User
Tags phpmyadmin

phpMyAdmin unexpectedly Unable to login, entered the user name and password after clicking "Execute" has been reported "#2002 unable to log on to the MySQL server."

Then finally found a solution to the "Phpmyadmin/libraries" folder in the config.default.php file

$cfg [' Servers '] [$i] [' host '] = ' localhost ';

Revision changed to

$cfg [' Servers '] [$i] [' host '] = ' 127.0.0.1 ';

It's settled.

A MySQL customer can connect to a MYSQLD server in two different ways: a UNIX socket, which is connected by a file in the file system (the default "/tmp/mysqld.sock"), or TCP/IP, which is connected by a port number. UNIX sockets are faster than TCP/IP, but are used only on servers that connect to the same computer . If you do not specify a host name or if you specify a special hostname, localhost, use a UNIX socket.
Error (2002) Can ' t connect to ... Usually means that no MySQL server is running on the system or when trying to connect to the MYSQLD server, you are using an incorrect socket file or TCP/IP port.
By checking (using PS) on your server there is a process called mysqld to start! If there is no mysqld process, you should start one.

#2002 cannot log on to the MySQL server

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.