From db8c2e8217fc67a1a506ae334ac40df54b52c739 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Thu, 1 Jun 2017 19:20:46 -0700 Subject: mysql: passwordless local user --- software/sql.page | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/software/sql.page b/software/sql.page index c485133..881a040 100644 --- a/software/sql.page +++ b/software/sql.page @@ -11,6 +11,19 @@ To output in tab-delimited format, do something like: mysql -u root -p -B < some_command.sql > output.tab +### Setup User Permissions + +On contemporary Debian, to login as root do: + + sudo mysql -u root + +Then create a new password-less local-only user: + + CREATE USER 'bnewbold'@'localhost' IDENTIFIED BY ''; + UPDATE mysql.user SET plugin='unix_socket' WHERE user='bnewbold'; + GRANT ALL PRIVILEGES ON * . * TO 'bnewbold'@'localhost'; + FLUSH PRIVILEGES; + ### UPDATE with JOIN To do an update based on a join:: -- cgit v1.2.3