CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • WordPress Installations (Moderators: Kurund Jalmi, Coleman Watts) »
  • No Database Selected
Pages: [1]

Author Topic: No Database Selected  (Read 2214 times)

willowtree

  • I’m new here
  • *
  • Posts: 1
  • Karma: 0
  • CiviCRM version: 4.3.5
  • CMS version: Wordpress
  • MySQL version: 5.1.68-cll
  • PHP version: 5.3.24
No Database Selected
August 04, 2013, 03:37:17 am
I've just installed Civicrm for the first time in a Wordpress install. I installed and went through the configuration checklist but now when I try to access Civicrm via the admin menu I get the following error:

Sorry but we are not able to provide this at the moment.
DB Error: no database selected

Return to home page.

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: No Database Selected
August 04, 2013, 10:40:47 am
Sounds odd. You will need to look at the file /wp-content/plugins/civicrm/civicrm.settings.php and see what is set for the details for the CiviCRM database connect string and check if they are correct.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

nahopra

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • CiviCRM version: 4.5.5
  • CMS version: Wordpress 4.1
  • MySQL version: 5.540
  • PHP version: 5.6.3
Re: No Database Selected
January 29, 2015, 03:36:51 am
Old thread, but I'm having exactly the same problem right after a fresh install of CiviCRM!

I checked the DB settings in the file civicrm.settings.php and found that they are correct.

The DB is also populated with all the tables that were created during install of CiviCRM.

The DB is on a separate database server provided by our webhoster.

Did you find a solution for this issue?

Best, NHP

nahopra

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • CiviCRM version: 4.5.5
  • CMS version: Wordpress 4.1
  • MySQL version: 5.540
  • PHP version: 5.6.3
Re: No Database Selected
January 29, 2015, 04:04:03 am
P.S.: Here is what I found in the Logfile. DB Timeout? But timeout is set to 240s by my hoster, and according to my restricted knowledge about CiviCRM, four minutes seems to be far beyond what is normal even in the first run…

Thanks for any help on that!

Code: [Select]
Jan 28 20:29:33  [info] $Fatal Error Details = Array
(
    [callback] => Array
        (
            [0] => CRM_Core_Error
            [1] => handle
        )

    [code] => -14
    [message] => DB Error: no database selected
    [mode] => 16
    [debug_info] => SET NAMES utf8 [nativecode=2006 ** MySQL server has gone away]
    [type] => DB_Error
    [user_info] => SET NAMES utf8 [nativecode=2006 ** MySQL server has gone away]
    [to_string] => [db_error: message="DB Error: no database selected" code=-14 mode=callback callback=CRM_Core_Error::handle prefix="" info="SET NAMES utf8 [nativecode=2006 ** MySQL server has gone away]"]
)


Jan 28 20:29:33  [info] $backTrace = #0 /home/.sites/352/site1879/web/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(239): CRM_Core_Error::backtrace("backTrace", TRUE)
#1 [internal function](): CRM_Core_Error::handle(Object(DB_Error))
#2 /home/.sites/352/site1879/web/wp/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(931): call_user_func((Array:2), Object(DB_Error))
#3 /home/.sites/352/site1879/web/wp/wp-content/plugins/civicrm/civicrm/packages/DB.php(975): PEAR_Error->PEAR_Error("DB Error: no database selected", -14, 16, (Array:2), "SET NAMES utf8 [nativecode=2006 ** MySQL server has gone away]")
#4 /home/.sites/352/site1879/web/wp/wp-content/plugins/civicrm/civicrm/packages/PEAR.php(564): DB_Error->DB_Error(-14, 16, (Array:2), "SET NAMES utf8 [nativecode=2006 ** MySQL server has gone away]")
#5 /home/.sites/352/site1879/web/wp/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1905): PEAR->raiseError(NULL, -14, NULL, NULL, "SET NAMES utf8 [nativecode=2006 ** MySQL server has gone away]", "DB_Error", TRUE)
#6 /home/.sites/352/site1879/web/wp/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php(899): DB_common->raiseError(-14, NULL, NULL, NULL, "2006 ** MySQL server has gone away")
#7 /home/.sites/352/site1879/web/wp/wp-content/plugins/civicrm/civicrm/packages/DB/mysql.php(309): DB_mysql->mysqlRaiseError(-14)
#8 /home/.sites/352/site1879/web/wp/wp-content/plugins/civicrm/civicrm/packages/DB/common.php(1216): DB_mysql->simpleQuery("SET NAMES utf8")
#9 /home/.sites/352/site1879/web/wp/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(2442): DB_common->query("SET NAMES utf8")
#10 /home/.sites/352/site1879/web/wp/wp-content/plugins/civicrm/civicrm/packages/DB/DataObject.php(1634): DB_DataObject->_query("SET NAMES utf8")
#11 /home/.sites/352/site1879/web/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(325): DB_DataObject->query("SET NAMES utf8")
#12 /home/.sites/352/site1879/web/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(366): CRM_Core_DAO->query("SET NAMES utf8")
#13 /home/.sites/352/site1879/web/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php(86): CRM_Core_DAO->initialize()
#14 /home/.sites/352/site1879/web/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO/Cache.php(141): CRM_Core_DAO->__construct()
#15 /home/.sites/352/site1879/web/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/Cache.php(150): CRM_Core_DAO_Cache->__construct()
#16 /home/.sites/352/site1879/web/wp/wp-content/plugins/civicrm/civicrm/CRM/Utils/Cache/SqlGroup.php(93): CRM_Core_BAO_Cache::setItem((Array:4), "community-messages", "communityMessages", NULL)
#17 /home/.sites/352/site1879/web/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/CommunityMessages.php(123): CRM_Utils_Cache_SqlGroup->set("communityMessages", (Array:4))
#18 /home/.sites/352/site1879/web/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/CommunityMessages.php(168): CRM_Core_CommunityMessages->getDocument()
#19 /home/.sites/352/site1879/web/wp/wp-content/plugins/civicrm/civicrm/CRM/Contact/Page/DashBoard.php(121): CRM_Core_CommunityMessages->pick()
#20 /home/.sites/352/site1879/web/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(331): CRM_Contact_Page_DashBoard->run((Array:2), NULL)
#21 /home/.sites/352/site1879/web/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(75): CRM_Core_Invoke::runItem((Array:13))
#22 /home/.sites/352/site1879/web/wp/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(52): CRM_Core_Invoke::_invoke((Array:2))
#23 /home/.sites/352/site1879/web/wp/wp-content/plugins/civicrm/civicrm.php(506): CRM_Core_Invoke::invoke((Array:2))
#24 [internal function](): CiviCRM_For_WordPress->invoke("")
#25 /home/.sites/352/site1879/web/wp/wp-includes/plugin.php(496): call_user_func_array((Array:2), (Array:1))
#26 /home/.sites/352/site1879/web/wp/wp-admin/admin.php(212): do_action("toplevel_page_CiviCRM")
#27 {main}

nahopra

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • CiviCRM version: 4.5.5
  • CMS version: Wordpress 4.1
  • MySQL version: 5.540
  • PHP version: 5.6.3
Re: No Database Selected
January 29, 2015, 04:30:02 am
This Thread seems to be much the same as http://forum.civicrm.org/index.php/topic,33417.msg141823.html#msg141823, but there's no solution in the other thread either…

Am I missing something?

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: No Database Selected
January 29, 2015, 04:35:16 am
My first answer is the same as on the other post--ask your host if they can help. The issue could be too many MySQL connections.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • WordPress Installations (Moderators: Kurund Jalmi, Coleman Watts) »
  • No Database Selected

This forum was archived on 2017-11-26.