In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
The unix_socket authentication plug-in allows users to use the operating system's credentials when connecting to MariaDB through a local Unix socket file.
Popular is to use the account of the Linux operating system to log in to the MariaDB/MySQL database.
This feature was added in MariaDB 10.4.6 and is currently supported in MySQL 8.0.18.
Usage:
1. Install the plug-in
Mysql > INSTALL PLUGIN auth_socket SONAME 'auth_socket.so';Query OK, 0 rows affected (0.01 sec)
2. Create a database account hechunyang
Mysql > CREATE USER 'hechunyang'@'localhost' IDENTIFIED WITH auth_socket;Query OK, 0 rows affected (0.00 sec)
3. Create an operating system account hechunyang
# useradd hechunyang
# passwd hechunyang
Log in to the operating system as a hechunyang user
4. Log in to MySQL 8.0.18
[root@localhost soft] # su-hechunyangLast login: Fri Nov 8 16:40:53 CST 2019 on pts/0 [hechunyang@localhost ~] $[hechunyang@localhost] $[hechunyang@localhost ~] $/ usr/local/mysql/bin/mysql-S / tmp/mysql_hcy.sock-uhechunyang-e "select version () "+-+ | version () | +-+ | 8.0.18 | +-+ [hechunyang@localhost ~] $
In this example, user hechunyang is logged into the operating system and has full shell access. He has authenticated using the operating system, and his MySQL account has been configured to use the unix_socket authentication plug-in, so he does not need to authenticate the database again. MySQL accepts his operating system credentials and allows him to connect.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.