12/27/2023 0 Comments Mysql create user network maskThis means no connecting through the Unix Domain Socket. The following can be seen in the error log: "'user' entry ignored in -skip-name-resolve mode.". If set, causes lines with localhost to be ignored according to the log. So: Case 0: Host = '10.10.10.10' (null test) update user set host='10.10.10.10' where user='foo' flush privileges Ĭase 1: Host = '%' update user set host='%' where user='foo' flush privileges Ĭase 2: Host = 'localhost' update user set host='localhost' where user='foo' flush privileges īehaviour varies and this apparently depends on skip-name-resolve. You will see something like: mysql quux 3u IPv4 0t0 TCP 127.0.0.1:->127.0.0.1:mysql (ESTABLISHED) get the PID of the mysql client process by examining the output of ps faux.To really check whether the connection goes via a TCP/IP socket or a Unix Domain socket (the password is set in the environment so that it is passed to the mysql process) Mysql -ufoo -protocol=SOCKET -execute="SELECT 1" \ The two connection attempts in one line: export MYSQL_PWD=bar \ If you leave out -protocol=TCP, the mysql command will still try to use the Unix domain socket. To connect to the server from "127.0.0.1" instead, run this on the command line mysql -pbar -ufoo -bind-address=127.0.0.1 -protocol=TCP One expects that the above matches "user comes from localhost" but certainly not "user comes from 127.0.0.1". the I/O pipe that is named by the filesystem entry /var/run/mysqld/mysqld.sock or some such), run this on the command line (use the -protocol option to make doubly sure) mysql -pbar -ufoo To connect to the Unix Domain Socket (i.e. | version | 10.0.23-MariaDB-0+deb8u1-log |Ĭreate a user foo with password bar for testing: CREATE USER IDENTIFIED BY 'bar' FLUSH PRIVILEGES Connect as superuser, and then: SHOW VARIABLES LIKE "%version%"
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |