explicitly set charset / collation of database when installing + new integrity-check-function to validate the database charset / collation and optionally fix it; fixes #1426

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2014-12-13 19:19:10 +01:00
parent 28b7cd6e90
commit 7dd6f9b97c
2 changed files with 36 additions and 1 deletions

View File

@@ -567,7 +567,7 @@ class FroxlorInstall {
// we have to create a new user and database for the froxlor unprivileged mysql access
$content .= $this->_status_message('begin', $this->_lng['install']['create_mysqluser_and_db']);
$ins_stmt = $db_root->prepare("CREATE DATABASE `".str_replace('`', '', $this->_data['mysql_database'])."`");
$ins_stmt = $db_root->prepare("CREATE DATABASE `".str_replace('`', '', $this->_data['mysql_database'])."` CHARACTER SET=utf8 COLLATE=utf8_general_ci");
$ins_stmt->execute();
$mysql_access_host_array = array_map('trim', explode(',', $this->_data['mysql_access_host']));