From 0fd8d363d6a434200b8d4ad0dc53799642bfa583 Mon Sep 17 00:00:00 2001 From: onefang Date: Sat, 29 Jun 2019 21:11:22 +1000 Subject: Deal with "passwordless" Mariadb installs. Thanks to Taylor for helping me figure this out. --- InstallItAll.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/InstallItAll.sh b/InstallItAll.sh index b7077b8..15f7c03 100755 --- a/InstallItAll.sh +++ b/InstallItAll.sh @@ -47,7 +47,9 @@ sudo /etc/init.d/mysql restart echo "Setting up OpenSim users. This next prompt asks for your MySQL root users password." # "create user if not exists" doesn't exist until MySQL 5.7, so we have to put up with a warning, which we can ignore. -mysql -u root -p -h localhost << zzzzEOFzzz +# Recent Debian based systems install with a passwordless root account, but it only works if run as the OS root user. +# Otherwise you can't get in. Yep, the -p seems to still be needed. +sudo mysql -u root -p -h localhost << zzzzEOFzzz create database if not exists $MYSQL_DB; create user '$MYSQL_USER' identified by '$MYSQL_PASSWORD'; create user '$MYSQL_USER'@localhost identified by '$MYSQL_PASSWORD'; -- cgit v1.1