Bug #61824 Can't connect to MySQL server on 'localhost' after upgrading from 5.1 to 5.5
Submitted: 11 Jul 2011 17:53 Modified: 4 Oct 2012 13:53
Reporter: Anthony Marston Email Updates:
Status: No Feedback Impact on me:
Category:MySQL Server: Installing Severity:S1 (Critical)
Version:5.5.14, 5.5.15, 5.5.16, 5.5.17 OS:Microsoft Windows (XP 32 bit)
Assigned to: CPU Architecture:Any

[11 Jul 2011 17:53] Anthony Marston
I am trying to upgrade from 5.1.54 to 5.5.14. My data dir is "F:/MySQL/Data/" and my program dir is "F:/MySQL/MySQL Server 5.5/". I do not change any options in the Instance Config Wizard apart from the character set (from latin1 to utf-8). It starts the instance OK, and I ran the myswl_upgrade program without any errors, but when I try to run any software I get the message:

"Can't connect to MySQL server on 'localhost'"

The error log shows the following:

110711 18:26:19 [Note] Plugin 'FEDERATED' is disabled.
110711 18:26:19 InnoDB: The InnoDB memory heap is disabled
110711 18:26:19 InnoDB: Mutexes and rw_locks use Windows interlocked functions
110711 18:26:19 InnoDB: Compressed tables use zlib 1.2.3
110711 18:26:19 InnoDB: Initializing buffer pool, size = 47.0M
110711 18:26:19 InnoDB: Completed initialization of buffer pool
110711 18:26:20 InnoDB: highest supported file format is Barracuda.
110711 18:26:20  InnoDB: Waiting for the background threads to start
110711 18:26:21 InnoDB: 1.1.8 started; log sequence number 81453687
110711 18:26:21 [Note] Event Scheduler: Loaded 0 events
110711 18:26:21 [Note] F:\MySQL\MySQL Server 5.5\bin\mysqld: ready for connections.
Version: '5.5.14'  socket: ''  port: 3306  MySQL Community Server (GPL)

The service is definitely running, and I can see all my databases if I run mysqlshow.

How to repeat:
Upgrade from 5.1.54 to 5.5.14, run instance config wizard, run mysql_upgrade, try to access database with any software.
[12 Jul 2011 13:24] Valeriy Kravchuk
Please, send the output of:

telnet localhost 3306

command from cmd.exe command line window.
[12 Jul 2011 14:08] Anthony Marston
This is the output from 'telnet localhost 3306':


Connection to host lost.
[15 Jul 2011 8:50] Valeriy Kravchuk
Looks like tables in mysql database were overwritten (see Bug #61826), so all your old user accounts may be not available. Try to connect as user root with no password.
[15 Jul 2011 9:04] Anthony Marston
I have tried various combinations of user and password, but with exactly the same result. The error message does not say "can't connect using 'user/password'", so it indicates to me that it cannot even connect to the database in order to try the user/password combination.
[26 Jul 2011 12:03] MySQL Verification Team
What is the exactly line command are you using when try to connect?. Thanks.
[26 Jul 2011 14:56] Anthony Marston
I get this error message when I try to connect using either MySQL Workbench or the older MySQL Administrator.

The code in m PHP program which also fails is as follows:

if (!$dbconnect = mysqli_connect($dbhost, $dbusername, $dbuserpass)) {
    trigger_error('MYSQL', E_USER_ERROR);
} // if
[16 Sep 2011 10:39] Anthony Marston
This problem still exists when upgrading from 5.1.59 to 5.5.16
[30 Oct 2011 11:21] Anthony Marston
This problem still persists when upgrading from 5.1.59 to 5.5.17
[13 Jun 2012 6:12] Santhosh Kumar
What's the actual solution for this bug Since I am getting the same
[4 Sep 2012 13:53] MySQL Verification Team
Please try version 5.2.27. If you still get the same issue, try to connect with:

mysql -uroot

(without password).

[5 Oct 2012 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".