Bug #62840 Cannot connect to Database Server - could not open database
Submitted: 20 Oct 2011 8:13 Modified: 11 Feb 2013 21:19
Reporter: Igor Oleinikov Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S1 (Critical)
Version:5.2.35 OS:Microsoft Windows (7 Ultimate x64)
Assigned to:
Tags: Connection

[20 Oct 2011 8:13] Igor Oleinikov
Description:
After several successfuly times of connecting to my database, after reboot, I've got an error:

<<
Cannot connect to Database Server

Your connection attempt failed for user '<user>' from your host to server at <host>:3306:

Could not open database
>>

I checked all listed reasons, and nothing is helpful.

And more! In connection manager, when I try to test the connection - it pass test succesfully.
And when I try to connect via command line tool, it successfully too.

I also tried to repair MySql Workbench installation. After repair problem is still exists.

How to repeat:
- Open connection manager
- Create connection (TCP/IP, port 3306, with username and password, schema specified)
- Test connection - success
- Close connection manager
- Open created connection (query database) - fail (Could not open database)
- Open created connection (command line) - success (password prompt)
[20 Oct 2011 8:23] Igor Oleinikov
Addition:

1. On each start of MySQL Workbench, message at the bottom occured: "Unsaved changes of an SQL Editor workspace were found. To restore them, open the corresponding SQL connection and save the SQL data. Otherwise these changes will be lost."

But I can't open the connection.
And if I click "Dismiss" button, it still not works and message occures again on next start.
[20 Oct 2011 8:25] Igor Oleinikov
Addition 2:

When I try to connect on Server Administrator with same connection (from connection manager) - it connects successfully!
[20 Oct 2011 16:16] Alfredo Kojima
Do you have a default schema set for the connection? Does it exist?
[20 Oct 2011 17:25] Igor Oleinikov
Yes, I have the default schema set, and it exists.
If I clear the default schema, error is still ocurres.
[24 Nov 2011 15:27] Alfredo Kojima
Are you connecting with root or a user with restricted privileges?
[24 Nov 2011 15:39] Igor Oleinikov
I tried with root user and other users. Result was the same.

Now, after several times of reboots, it works!
But what it was?
[7 Dec 2011 7:57] Valerii Kravchuk
Do you use hostnames or IP addresses when you define users on server? If you use hostnames, maybe it was just reverse DNS lookup problem...
[8 Jan 2012 7: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".
[1 Feb 2013 9:36] Dalibor Karlović
I have this exact problem on 5.2.45 (Fedora 17)
[11 Feb 2013 21:19] Ruben Dario Morquecho Valdez
Could you please try new version 5.2.46.

- Do you use hostnames or IP?
- do you use a remote or local Server DB?

Please, if you can provide details in connection parameters set, in order to reproduce it.

Thanks for interesting on mysql Workbench!.
[1 Jun 2013 11:34] Claudia Haecker
I am having the same problem. I am working in a local connection. I installed MySQL 5,5,13 in both my desktop and laptop. Both connections were successful. I did the connection to the system several times and it worked. When I rebooted my laptop and tried to connect I got the error msg back. I flushed the password and created a new password and It let me in several times but every time I reboot it changes de password. The only special characteristic in my system, Windows wsa set to Bogota, Lima time zone at installation time (utc-5)after installation I changed Date and Time To US EST time.