Advertisement
Guest User

Untitled

a guest
May 9th, 2016
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.66 KB | None | 0 0
  1. Set USE_SSL to 0 for testing_ssl
  2. mysql> update mysql_users set use_ssl=0 where username='testing_ssl'
  3. -> ;
  4. Query OK, 1 row affected (0.00 sec)
  5.  
  6. mysql> LOAD MYSQL SERVERS TO RUNTIME;
  7. Query OK, 0 rows affected (0.01 sec)
  8.  
  9. mysql> LOAD MYSQL USERS TO RUNTIME;
  10. Query OK, 0 rows affected (0.00 sec)
  11.  
  12. [root@xxxxxxxxxxx ~]# mysql -h172.18.153.161 -utesting_ssl -p
  13. Enter password:
  14. Welcome to the MySQL monitor. Commands end with ; or \g.
  15. Your MySQL connection id is 3
  16. Server version: 5.1.30 (ProxySQL)
  17.  
  18. Copyright (c) 2009-2015 Percona LLC and/or its affiliates
  19. Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
  20.  
  21. Oracle is a registered trademark of Oracle Corporation and/or its
  22. affiliates. Other names may be trademarks of their respective
  23. owners.
  24.  
  25. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
  26.  
  27. mysql> \s
  28. --------------
  29. mysql Ver 14.14 Distrib 5.6.23-72.1, for Linux (x86_64) using EditLine wrapper
  30.  
  31. Connection id: 3
  32. Current database: information_schema
  33. Current user: testing_ssl@172.18.153.161
  34. SSL: Not in use
  35. Current pager: stdout
  36. Using outfile: ''
  37. Using delimiter: ;
  38. Server version: 5.1.30 (ProxySQL)
  39. Protocol version: 10
  40. Connection: 172.18.153.161 via TCP/IP
  41. Server characterset: latin1
  42. Db characterset: utf8
  43. Client characterset: utf8
  44. Conn. characterset: utf8
  45. TCP port: 3306
  46. Uptime: 10 min 37 sec
  47.  
  48. Threads: 1 Questions: 6 Slow queries: 0
  49. --------------
  50.  
  51. mysql> show processlist;
  52. +------+-------------+----------------------+--------------------+---------+------+-------+------------------+-----------+---------------+
  53. | Id | User | Host | db | Command | Time | State | Info | Rows_sent | Rows_examined |
  54. +------+-------------+----------------------+--------------------+---------+------+-------+------------------+-----------+---------------+
  55. | 3 | root | localhost | NULL | Sleep | 3 | | NULL | 0 | 0 |
  56. | 38 | monitoring | localhost | NULL | Sleep | 4 | | NULL | 0 | 0 |
  57. | 42 | monitoring | localhost | NULL | Sleep | 59 | | NULL | 403 | 403 |
  58. | 63 | monitoring | localhost | NULL | Sleep | 22 | | NULL | 0 | 0 |
  59. | 2908 | monitor | 172.18.153.161:38034 | NULL | Sleep | 0 | | NULL | 0 | 0 |
  60. | 3183 | testing | 172.18.153.161:38835 | information_schema | Sleep | 5 | | NULL | 0 | 0 |
  61. | 3232 | testing_ssl | 172.18.153.161:39006 | information_schema | Query | 0 | init | show processlist | 0 | 0 |
  62. | 3240 | root | localhost | information_schema | Sleep | 21 | | NULL | 1 | 5 |
  63. +------+-------------+----------------------+--------------------+---------+------+-------+------------------+-----------+---------------+
  64. 8 rows in set (0.02 sec)
  65.  
  66.  
  67. mysql> select * from USER_STATISTICS where user ='testing_ssl'\G
  68. *************************** 1. row ***************************
  69. USER: testing_ssl
  70. TOTAL_CONNECTIONS: 1
  71. CONCURRENT_CONNECTIONS: 0
  72. CONNECTED_TIME: 144
  73. BUSY_TIME: 0
  74. CPU_TIME: 0
  75. BYTES_RECEIVED: 294
  76. BYTES_SENT: 0
  77. BINLOG_BYTES_WRITTEN: 0
  78. ROWS_FETCHED: 21
  79. ROWS_UPDATED: 0
  80. TABLE_ROWS_READ: 63
  81. SELECT_COMMANDS: 4
  82. UPDATE_COMMANDS: 0
  83. OTHER_COMMANDS: 4
  84. COMMIT_TRANSACTIONS: 0
  85. ROLLBACK_TRANSACTIONS: 0
  86. DENIED_CONNECTIONS: 0
  87. LOST_CONNECTIONS: 1
  88. ACCESS_DENIED: 0
  89. EMPTY_QUERIES: 0
  90. TOTAL_SSL_CONNECTIONS: 1
  91.  
  92. Check out TOTAL_SSL_CONNECTIONS: 1 when use_ssl was disabled.
  93.  
  94. After that I enabled it back,
  95. mysql> update mysql_users set use_ssl=1 where username='testing_ssl'
  96. -> ;
  97. Query OK, 1 row affected (0.00 sec)
  98.  
  99. mysql> LOAD MYSQL SERVERS TO RUNTIME;
  100. Query OK, 0 rows affected (0.00 sec)
  101.  
  102. mysql> LOAD MYSQL USERS TO RUNTIME;
  103. Query OK, 0 rows affected (0.00 sec)
  104.  
  105. mysql> select * from mysql_users;
  106. +-------------+----------+--------+---------+-------------------+----------------+---------------+------------------------+--------------+---------+----------+-----------------+
  107. | username | password | active | use_ssl | default_hostgroup | default_schema | schema_locked | transaction_persistent | fast_forward | backend | frontend | max_connections |
  108. +-------------+----------+--------+---------+-------------------+----------------+---------------+------------------------+--------------+---------+----------+-----------------+
  109. | testing | xxxxx | 1 | 0 | 2 | NULL | 0 | 0 | 0 | 1 | 1 | 10000 |
  110. | testing_ssl | xxxxx | 1 | 1 | 1 | NULL | 0 | 0 | 0 | 1 | 1 | 10000 |
  111. | test1 | xxxxx | 1 | 0 | 0 | NULL | 0 | 0 | 0 | 1 | 1 | 10000 |
  112. +-------------+----------+--------+---------+-------------------+----------------+---------------+------------------------+--------------+---------+----------+-----------------+
  113. 3 rows in set (0.00 sec)
  114.  
  115. # mysql -h172.18.153.161 -utesting_ssl -p
  116. Enter password:
  117. ERROR 1045 (#2800): Access denied for user 'testing_ssl' (using password: YES)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement