diff --git a/client/src/app/install/install-step-3-database.js b/client/src/app/install/install-step-3-database.js index edb2b9ab..85240d3a 100644 --- a/client/src/app/install/install-step-3-database.js +++ b/client/src/app/install/install-step-3-database.js @@ -1,4 +1,5 @@ import React from 'react'; +import _ from 'lodash'; import history from 'lib-app/history'; import i18n from 'lib-app/i18n'; @@ -64,7 +65,7 @@ class InstallStep3Database extends React.Component { }, () => { API.call({ path: '/system/init-database', - data: form + data: _.extend({}, form, {dbPort: form.dbPort || 3306}) }) .then(() => history.push('/install/step-4')) .catch(({message}) => this.setState({ diff --git a/server/controllers/system/init-database.php b/server/controllers/system/init-database.php index f6fea28e..b62aa61c 100755 --- a/server/controllers/system/init-database.php +++ b/server/controllers/system/init-database.php @@ -14,7 +14,8 @@ use RedBeanPHP\Facade as RedBean; * * @apiPermission any * - * @apiParam {String} dbHost Url of the database server. + * @apiParam {String} dbHost Location of the database server. + * @apiParam {String} dbPort Port of the database server. * @apiParam {String} dbName Name of the database. If not given, the system will try to create one. * @apiParam {String} dbUser User of the database server. * @apiParam {String} dbPassword Password of the database server.