From 1408c8033159a07e5c2c484e1285fb6325cbe003 Mon Sep 17 00:00:00 2001 From: MPLew-is Date: Wed, 23 Mar 2016 05:59:40 -0400 Subject: [PATCH] Fix configuration file encoding error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PowerShell apparently defaults to UTF16, so when the configuration is read like ASCII or UTF-8, there are “null” characters between every “echo”ed character in this script --- mysql.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mysql.json b/mysql.json index dd910f394d..615a105aa2 100644 --- a/mysql.json +++ b/mysql.json @@ -34,8 +34,8 @@ mysqld --initialize-insecure cp $dir/my-default.ini $dir/my.ini #Output client configuration to my.ini file so no username is required when connecting -echo \"\" >> $dir/my.ini -echo \"[client]\" >> $dir/my.ini -echo \"user=root\" >> $dir/my.ini +echo \"\" | out-file \"$dir/my.ini\" -Encoding UTF8 -Append +echo \"[client]\" | out-file \"$dir/my.ini\" -Encoding UTF8 -Append +echo \"user=root\" | out-file \"$dir/my.ini\" -Encoding UTF8 -Append " }