Skip to content

Commit

Permalink
Re-added: Fix for backward compatibility (MySQL 5.7)
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
nuxwin committed Jul 30, 2016
1 parent 0f1e763 commit 03252ac
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions engine/PerlLib/Servers/sqld/mysql/installer.pm
Expand Up @@ -234,6 +234,7 @@ sub _buildConf
$cfgTpl .= <<'EOF';
[mysqld]
performance_schema = 0
sql_mode = "NO_AUTO_CREATE_USER"
[mysql_upgrade]
host = {DATABASE_HOST}
port = {DATABASE_PORT}
Expand Down Expand Up @@ -328,8 +329,8 @@ EOF

my $db = iMSCP::Database->factory();

# Set SQL mode (transitional)
my $qrs = $db->doQuery( 's', "SET GLOBAL sql_mode = ''" );
# Set SQL mode (BC reasons)
my $qrs = $db->doQuery( 's', "SET GLOBAL sql_mode = 'NO_AUTO_CREATE_USER'" );
unless (ref $qrs eq 'HASH') {
error( $qrs );
return 1;
Expand Down

0 comments on commit 03252ac

Please sign in to comment.