summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2017-06-01 19:20:46 -0700
committerbnewbold <bnewbold@robocracy.org>2017-06-01 19:20:46 -0700
commitdb8c2e8217fc67a1a506ae334ac40df54b52c739 (patch)
tree7075c1db0eb6872a168d4b2fc4bdc8c1b32b45d8
parent904e0ff025d6bdb3c48a823416342796ffe5c8c8 (diff)
downloadknowledge-db8c2e8217fc67a1a506ae334ac40df54b52c739.tar.gz
knowledge-db8c2e8217fc67a1a506ae334ac40df54b52c739.zip
mysql: passwordless local user
-rw-r--r--software/sql.page13
1 files changed, 13 insertions, 0 deletions
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::