Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Set USE_SSL to 0 for testing_ssl
- mysql> update mysql_users set use_ssl=0 where username='testing_ssl'
- -> ;
- Query OK, 1 row affected (0.00 sec)
- mysql> LOAD MYSQL SERVERS TO RUNTIME;
- Query OK, 0 rows affected (0.01 sec)
- mysql> LOAD MYSQL USERS TO RUNTIME;
- Query OK, 0 rows affected (0.00 sec)
- [root@xxxxxxxxxxx ~]# mysql -h172.18.153.161 -utesting_ssl -p
- Enter password:
- Welcome to the MySQL monitor. Commands end with ; or \g.
- Your MySQL connection id is 3
- Server version: 5.1.30 (ProxySQL)
- Copyright (c) 2009-2015 Percona LLC and/or its affiliates
- Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
- Oracle is a registered trademark of Oracle Corporation and/or its
- affiliates. Other names may be trademarks of their respective
- owners.
- Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
- mysql> \s
- --------------
- mysql Ver 14.14 Distrib 5.6.23-72.1, for Linux (x86_64) using EditLine wrapper
- Connection id: 3
- Current database: information_schema
- Current user: testing_ssl@172.18.153.161
- SSL: Not in use
- Current pager: stdout
- Using outfile: ''
- Using delimiter: ;
- Server version: 5.1.30 (ProxySQL)
- Protocol version: 10
- Connection: 172.18.153.161 via TCP/IP
- Server characterset: latin1
- Db characterset: utf8
- Client characterset: utf8
- Conn. characterset: utf8
- TCP port: 3306
- Uptime: 10 min 37 sec
- Threads: 1 Questions: 6 Slow queries: 0
- --------------
- mysql> show processlist;
- +------+-------------+----------------------+--------------------+---------+------+-------+------------------+-----------+---------------+
- | Id | User | Host | db | Command | Time | State | Info | Rows_sent | Rows_examined |
- +------+-------------+----------------------+--------------------+---------+------+-------+------------------+-----------+---------------+
- | 3 | root | localhost | NULL | Sleep | 3 | | NULL | 0 | 0 |
- | 38 | monitoring | localhost | NULL | Sleep | 4 | | NULL | 0 | 0 |
- | 42 | monitoring | localhost | NULL | Sleep | 59 | | NULL | 403 | 403 |
- | 63 | monitoring | localhost | NULL | Sleep | 22 | | NULL | 0 | 0 |
- | 2908 | monitor | 172.18.153.161:38034 | NULL | Sleep | 0 | | NULL | 0 | 0 |
- | 3183 | testing | 172.18.153.161:38835 | information_schema | Sleep | 5 | | NULL | 0 | 0 |
- | 3232 | testing_ssl | 172.18.153.161:39006 | information_schema | Query | 0 | init | show processlist | 0 | 0 |
- | 3240 | root | localhost | information_schema | Sleep | 21 | | NULL | 1 | 5 |
- +------+-------------+----------------------+--------------------+---------+------+-------+------------------+-----------+---------------+
- 8 rows in set (0.02 sec)
- mysql> select * from USER_STATISTICS where user ='testing_ssl'\G
- *************************** 1. row ***************************
- USER: testing_ssl
- TOTAL_CONNECTIONS: 1
- CONCURRENT_CONNECTIONS: 0
- CONNECTED_TIME: 144
- BUSY_TIME: 0
- CPU_TIME: 0
- BYTES_RECEIVED: 294
- BYTES_SENT: 0
- BINLOG_BYTES_WRITTEN: 0
- ROWS_FETCHED: 21
- ROWS_UPDATED: 0
- TABLE_ROWS_READ: 63
- SELECT_COMMANDS: 4
- UPDATE_COMMANDS: 0
- OTHER_COMMANDS: 4
- COMMIT_TRANSACTIONS: 0
- ROLLBACK_TRANSACTIONS: 0
- DENIED_CONNECTIONS: 0
- LOST_CONNECTIONS: 1
- ACCESS_DENIED: 0
- EMPTY_QUERIES: 0
- TOTAL_SSL_CONNECTIONS: 1
- Check out TOTAL_SSL_CONNECTIONS: 1 when use_ssl was disabled.
- After that I enabled it back,
- mysql> update mysql_users set use_ssl=1 where username='testing_ssl'
- -> ;
- Query OK, 1 row affected (0.00 sec)
- mysql> LOAD MYSQL SERVERS TO RUNTIME;
- Query OK, 0 rows affected (0.00 sec)
- mysql> LOAD MYSQL USERS TO RUNTIME;
- Query OK, 0 rows affected (0.00 sec)
- mysql> select * from mysql_users;
- +-------------+----------+--------+---------+-------------------+----------------+---------------+------------------------+--------------+---------+----------+-----------------+
- | username | password | active | use_ssl | default_hostgroup | default_schema | schema_locked | transaction_persistent | fast_forward | backend | frontend | max_connections |
- +-------------+----------+--------+---------+-------------------+----------------+---------------+------------------------+--------------+---------+----------+-----------------+
- | testing | xxxxx | 1 | 0 | 2 | NULL | 0 | 0 | 0 | 1 | 1 | 10000 |
- | testing_ssl | xxxxx | 1 | 1 | 1 | NULL | 0 | 0 | 0 | 1 | 1 | 10000 |
- | test1 | xxxxx | 1 | 0 | 0 | NULL | 0 | 0 | 0 | 1 | 1 | 10000 |
- +-------------+----------+--------+---------+-------------------+----------------+---------------+------------------------+--------------+---------+----------+-----------------+
- 3 rows in set (0.00 sec)
- # mysql -h172.18.153.161 -utesting_ssl -p
- Enter password:
- ERROR 1045 (#2800): Access denied for user 'testing_ssl' (using password: YES)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement