Bug #65589 Not able see the databases which has created by alfresco share
Submitted: 12 Jun 2012 6:46 Modified: 25 Oct 2012 0:11
Reporter: Amarnath Lingshetty Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S5 (Performance)
Version:5.5.16 OS:Linux
Assigned to: CPU Architecture:Any

[12 Jun 2012 6:46] Amarnath Lingshetty
Description:
Every time i execute mysqldump command i get this error message:
mysqldump:got error 1049 "unknown database when selecting the databases"
even thought the database exist.

mysql\bin>mysqldump -u root -p dbname > dump.sql
mysqldump:got error 1049 "unknown database dbname when selecting the databases"

i tied with all possible syntax butresult is same...
The content of dump file:

-- MySQL dump 10.13  Distrib 5.5.16, for Win32 (x86)
--
-- Host: localhost    Database: dbname
-- ------------------------------------------------------
-- Server version	5.0.83-community

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES UTF8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Not dumping tablespaces as no INFORMATION_SCHEMA.FILES table on this server
--

How to repeat:
create the databse with appropriate login credentials...
and try to dackup the database which you created...
using mysqldump command..
mysql\bin>mysqldump -u root -p dbname > dump.sql

 

Suggested fix:
please go though this error message....
[12 Jun 2012 6:56] Amarnath Lingshetty
screenshot

Attachment: files.zip (application/x-zip-compressed, text), 54.43 KiB.

[12 Jun 2012 7:03] Valeriy Kravchuk
Please, upload the entire error log of your server (should be <hostname>.err file in the datadir). I suspect you had upgraded from some older version and something was missed during upgrade.
[12 Jun 2012 7:13] Amarnath Lingshetty
logfile,scrrenshot,dump file

Attachment: updated.zip (application/x-zip-compressed, text), 106.87 KiB.

[12 Jun 2012 7:24] Valeriy Kravchuk
I do not see any messages related to problematic t6ables in mysql database, so my assumption about problematic upgrade was wrong.

I wonder, though, why you restart your server all the time soon after startup:

120607 16:36:50 [Note] D:\AlfrescoApp\mysql\bin\mysqld.exe: ready for connections.
Version: '5.5.16'  socket: ''  port: 3307  MySQL Community Server (GPL)
120607 16:42:26 [Note] D:\AlfrescoApp\mysql\bin\mysqld.exe: Normal shutdown

120607 16:42:26 [Note] Event Scheduler: Purging the queue. 0 events
120607 16:42:26  InnoDB: Starting shutdown...
120607 16:42:27  InnoDB: Shutdown completed; log sequence number 216536634
120607 16:42:27 [Note] D:\AlfrescoApp\mysql\bin\mysqld.exe: Shutdown complete

As for the database that you can not dump, please, connect with mysql command line client and send the output of:

show databases;

Then, please, specify the exact database name you are trying to dump (from this list).
[12 Jun 2012 7:31] Valeriy Kravchuk
Sorry, I see SHOW DATABASES results on your screenshot. So, looks like the problematic database is called "dbname". Let's double check it this way:

select concat('>', concat(schema_name, '<')) name, length(schema_name) size 
from information_schema.schemata 
where schema_name like 'db%'\G
[12 Jun 2012 7:52] Amarnath Lingshetty
its not with dbanme,i cant even dump any of the databases which are listed there....
[12 Jun 2012 7:59] Amarnath Lingshetty
the output of above query...
name:>dbname<
size:6
1 row in set(0.13sec)
[12 Jun 2012 8:04] Amarnath Lingshetty
output of query

Attachment: out.7z (application/octet-stream, text), 28.73 KiB.

[12 Jun 2012 9:44] Valeriy Kravchuk
Please, send the output of:

mysqldump --version

Also, please, consider upgrade to recent version, 5.5.25.
[12 Jun 2012 10:01] Amarnath Lingshetty
The output of above query is :
mysqldump  Ver 10.13 Distrib 5.5.16, for Win32 (x86)
[12 Jun 2012 13:35] MySQL Verification Team
your mysql client using one version of server and your mysqldump another.
you probably have a wrong host in [mysql] or [mysqldump] or [client] sections of my.ini.

try running mysql and mysqldump with --no-defaults as the first argument
and explicitly specify the host and port on the command line.
[15 Jun 2012 9:47] Amarnath Lingshetty
Thanx for information...
[25 Jun 2012 9:47] Amarnath Lingshetty
Envirnoment:Linux
Not able to see the databases which already exist...
i have installed alfresco in linux envirnoment which intrun creates the bitnami_alfresco database.. the applications runs fine
and bitnami_alfresco is updated on every interaction with user..

but in mysql i cant able to see that database itself 
port number which i am using:3305 

i tried with folloeing commands

mysql>bin>mysql -u root --port 3305 -h localhost 
mysql>show databases;
but database bitnami_alfresco is not listed

any suggestion plz
[29 Jun 2012 14:27] Valeriy Kravchuk
I've noted port 3307 in your log previously, now you speak about port 3305. Are you sure you check on the same instance where database was created? Please, double check.
[30 Jul 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".
[27 Aug 2012 18:30] matteo sisti sette
Exact same issue here. Always the bogus error "Unknown database" when the database does exist.

Please reopen

Did anybody find a workaround?
[25 Sep 2012 0:11] MySQL Verification Team
Please reply last @Valeriy Kravchuk question. Thanks.
[25 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".