mysql: default to no root password (like 5.6).
Point the users to the relevant command so they can secure it more if they wish. Closes Homebrew/homebrew#46159. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
aba2bab20a
commit
4a90e1087b
1 changed files with 14 additions and 5 deletions
|
@ -134,18 +134,27 @@ class Mysql < Formula
|
|||
datadir.mkpath
|
||||
unless (datadir/"mysql/user.frm").exist?
|
||||
ENV["TMPDIR"] = nil
|
||||
system bin/"mysqld", "--initialize", "--user=#{ENV["USER"]}",
|
||||
system bin/"mysqld", "--initialize-insecure", "--user=#{ENV["USER"]}",
|
||||
"--basedir=#{prefix}", "--datadir=#{datadir}", "--tmpdir=/tmp"
|
||||
end
|
||||
end
|
||||
|
||||
def caveats; <<-EOS.undent
|
||||
A "/etc/my.cnf" from another install may interfere with a Homebrew-built
|
||||
server starting up correctly.
|
||||
def caveats
|
||||
s = <<-EOS.undent
|
||||
We've installed your MySQL database without a root password. To secure it run:
|
||||
mysql_secure_installation
|
||||
|
||||
To connect:
|
||||
To connect run:
|
||||
mysql -uroot
|
||||
EOS
|
||||
if File.exist? "/etc/my.cnf"
|
||||
s += <<-EOS.undent
|
||||
|
||||
A "/etc/my.cnf" from another install may interfere with a Homebrew-built
|
||||
server starting up correctly.
|
||||
EOS
|
||||
end
|
||||
s
|
||||
end
|
||||
|
||||
plist_options :manual => "mysql.server start"
|
||||
|
|
Loading…
Reference in a new issue