When you install 7.7.9. cannot connect to the database. Set on hosting version 7.7.9. (also tried 7.8.2), after entering the database receives a message that cannot connect to the database server. •Database error: Could not connect to the database. Please refer to suitecrm.log for details.
File log: Thu Mar 2 11:21:55 2017 [47494][-none-][FATAL] Could not connect to DB server XXXXXXX.1gb.ru as admin. port 80: Lost connection to MySQL server at ‘reading initial communication packet’, system error: 0
.
The base is already created, also hosted, make the field issued on the host name, server, user, and database password. I tried to run the test script check the database connection from that directory, everything is fine. What could be wrong? Tell me!
Можно по-русски написать ответ!
Where have you entered the credentials and the address of the database?
Are you sure they are correct? Are you sure that your script to test your DB connection has the same credentials or is working fine?
Please provide a screenshot or describe what yu have done.
Here is a screenshot of the database name from phpMyAdmin:
Here is a screenshot showing yur where to enter database information in the installation script:
q
z
Looking at thye two pictures you posted I think that you have entered both a wrong database name and database username.
The value you have entered is gb_crm_kik for both, while in the first image they are both different: gb_kikcrm
Try entering the correct values (and password of course) then post back the result.
About the name of the database everything is fine. I just for these 2 days created 2 databases: gb_kikcrm and gb_crm_kik. They’re the workers and I set up the correct data the first or second base. As you can see in the pictures, there are different server bases. Let me remind you that I have installed sugarcrm, no problems arose. Yesterday I tried to create a separate site (dns 3-tier) and install, same problem.
Sometimes comes this error:
Creating SuiteCRM configuration file (config.php)
Creating SuiteCRM application tables, audit tables and relationship metadata
Creating the database gb_kikcrm on mysql89.1gb.ru… Fatal error: Uncaught exception ‘Exception’ with message ‘Database error. Please check suitecrm.log for details.’ in /home/virtwww/w_a8c_a77bfe95/http/include/utils.php:1623 Stack trace: #0 /home/virtwww/w_a8c_a77bfe95/http/include/database/DBManager.php(347): sugar_die(‘Database error…’) #1 /home/virtwww/w_a8c_a77bfe95/http/include/database/DBManager.php(321): DBManager->registerError(’ Query Failed: …’, ‘MySQL error 101…’, true) #2 /home/virtwww/w_a8c_a77bfe95/http/include/database/MysqliManager.php(160): DBManager->checkError(’ Query Failed: …’, true) #3 /home/virtwww/w_a8c_a77bfe95/http/include/database/MysqlManager.php(1422): MysqliManager->query(‘DROP DATABASE I…’, true) #4 /home/virtwww/w_a8c_a77bfe95/http/install/install_utils.php(678): MysqlManager->dropDatabase(‘gb_kikcrm’) #5 /home/virtwww/w_a8c_a77bfe95/http/install/performSetup.php(175): handleDbCreateDatabase() #6 /home/virtwww/w_a8c_a77bfe95/http/install.php(770): require(’/home/virtwww/w…’) #7 {main} thrown in /home/virtwww/w_a8c_a77bfe95/http/include/utils.php on line 1623
I parallel to communicate with the admins of my hosting, here is what they replied:
2017-03-03 09:24 1Gb.ru this query: DROP DATABASE IF EXISTS gb_kikcrm
, you just do not have the user you can’t delete the database using a query in Mysql
2017-03-03 09:24 1Gb.ru: the database Itself is available and working.
2017-03-03 09:25 1Gb.ru And, accordingly, to create a database through queries neither can you, it is necessary to exclude from the script requests the deletion and creation of the database, and leave only to work with its contents.
So this is a database credentials problem as indicated in my first post.
Anyway, I have not tried it but you could comment out the statement where the database is dropped and created.
I searched the install code and I found a call to the function handleDbCreateDatabase(); in the file: install/PerformSetup.php at line 175 (this is version 7.8.2).
The portion of code is:
if($setup_db_create_database) {
installLog("calling handleDbCreateDatabase()");
installerHook('pre_handleDbCreateDatabase');
handleDbCreateDatabase();
installerHook('post_handleDbCreateDatabase');
Try to comment the call to that function:
if($setup_db_create_database) {
installLog("calling handleDbCreateDatabase()");
installerHook('pre_handleDbCreateDatabase');
// handleDbCreateDatabase();
installerHook('post_handleDbCreateDatabase');
Then go to phpMyAdmin and delete your database and recreate a new empty one. Then you can try the install. Hopefully this hack will bybass the issue that you are getting.
PS: the function handleDbCreateDatabase() is defined at line 662 of the file install/install_utils.php
The code is:
/**
* creates the new database
*/
function handleDbCreateDatabase() {
global $mod_strings;
global $setup_db_database_name;
global $setup_db_host_name;
global $setup_db_host_instance;
global $setup_db_port_num;
global $setup_db_admin_user_name;
global $setup_db_admin_password;
global $sugar_config;
echo "{$mod_strings['LBL_PERFORM_CREATE_DB_1']} {$setup_db_database_name} {$mod_strings['LBL_PERFORM_CREATE_DB_2']} {$setup_db_host_name}...";
$db = getDbConnection();
if($db->dbExists($setup_db_database_name)) {
$db->dropDatabase($setup_db_database_name);
}
$db->createDatabase($setup_db_database_name);
echo $mod_strings['LBL_PERFORM_DONE'];
}
As you can see it first checks if the database exists and if it does it drops it and, once done it recreates it, so if you bybass it you should avoid your problem.
Please post back if this hack works.