mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 12:00:55 +01:00
Show MySQL exception when unable to connect during setup
Summary: a well-titled diff this be. i feel 'meh' about the change; doesn't seem to help too much imo. Test Plan: edited my custom conf file to have errors - 127.0.0.1 => 127.0.0.2 mysql_user => mysql_users and for phabricator to be in setup mode. for each error i verified that i liked the display. Reviewers: epriestley, jungejason Reviewed By: jungejason CC: aran, jungejason Differential Revision: 1129
This commit is contained in:
parent
e0a56cb938
commit
4afe82f3e2
1 changed files with 5 additions and 4 deletions
|
@ -399,12 +399,13 @@ class PhabricatorSetup {
|
||||||
queryfx($conn_raw, 'SELECT 1');
|
queryfx($conn_raw, 'SELECT 1');
|
||||||
self::write(" okay Connection successful!\n");
|
self::write(" okay Connection successful!\n");
|
||||||
} catch (AphrontQueryConnectionException $ex) {
|
} catch (AphrontQueryConnectionException $ex) {
|
||||||
|
$message = $ex->getMessage();
|
||||||
self::writeFailure();
|
self::writeFailure();
|
||||||
self::write(
|
self::write(
|
||||||
"Setup failure! Unable to connect to MySQL database ".
|
"Setup failure! MySQL exception: {$message} \n".
|
||||||
"'{$conn_host}' with user '{$conn_user}'. Edit Phabricator ".
|
"Edit Phabricator configuration keys 'mysql.user', ".
|
||||||
"configuration keys 'mysql.user', 'mysql.host' and 'mysql.pass' to ".
|
"'mysql.host' and 'mysql.pass' to enable Phabricator ".
|
||||||
"enable Phabricator to connect.");
|
"to connect.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue