Unable to connect to MySQL, please check if MySQL is started and user password is set correctly

Source: Internet
Author: User
Tags phpmyadmin

After installation, login background prompt

Unable to connect to MySQL, please check if MySQL is started and user password is set correctly

Check if MySQL starts NETSTAT-LNPT
Is there a 3306 port?


One has
A Check to see if the/www/wdlinux/wdcp/data/db.inc.php file exists,
And check the user password, no normal and login, can be logged in phpMyAdmin, or SSH MySQL
Check for wdcpdb database and related data sheet after login
Or
B Check whether there are files under WDCPD directory and directory under/www/wdlinux/mysql/var/
If not
Can manually create database wdcpdb database in phpMyAdmin, and WDCP user and save information to/www/wdlinux/wdcp/data/db.inc.php file
Import the/www/wdlinux/wdcp/wdcpdb.sql file at the same time
Complete


two No
Log in to the server with SSH
Service mysqld Restart
See if it starts up normally and puts the wrong information on it.

if MySQL does not start up (with errors), perform the following
Sed-i ' s/skip-innodb/#skip-innodb/g '/www/wdlinux/etc/my.cnf
Again
Service mysqld Restart
Give it a try

Three tools Repair
You can use the tool to check, login to the server with SSH, and then execute the following command
sh/www/wdlinux/tools/mysql_wdcp_chg.sh
More to see http://www.wdlinux.cn/bbs/thread-1607-1-1.html


Report
/www/wdlinux/wdcp/data/db.inc.php content format is as follows
    1. <?
    2. $dbhost = ' localhost ';
    3. $dbuser = ' WDCP ';
    4. $DBPW = ' 641CBB11 ';
    5. $dbname = ' wdcpdb ';
    6. $pconnect = 0;
    7. $dbcharset = ' GBK ';
    8. ?>
Copy Code
//-----------------------------------------------------

[[Email protected] var]# service mysqld stop

MySQL Manager or server PID file could not being found!       [FAILED] Workaround: First look at the process [[email protected] mysql]# PS aux |grep mysq*root      2643  0.0  0.2   4536  1224?        s    01:09   0:00/bin/sh/usr/local/mysql/bin/mysqld_safe--datadir=/usr/ Local/mysql/var--pid-file=/usr/local/mysql/var/centos.pidmysql     2757  0.0  1.2  36976  6608?       &NBSP;SL   01:09   0:00/USR/LOCAL/MYSQL/LIBEXEC/MYSQLD--basedir=/usr/local/mysql-- Datadir=/usr/local/mysql/var--user=mysql--log-error=/usr/local/mysql/var/centos.err--pid-file=/usr/local/mysql /var/centos.pid--socket=/tmp/mysql.sock--port=3306root      4788  0.0  0.1   3920   684 PTS/2    r+   11:11   0:00 grep mysq* If you see the above, it means that the MySQL process is dead, and then the process of killing these cards will be closed [[email  Protected] mysql]# kill 2643[[email protected] mysql]# kill 2757 StartMove MySQL is ok [[email protected] mysql]# service mysqld startstarting mysql. 

Unable to connect to MySQL, please check if MySQL is started and user password is set correctly

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.