1 drop table if exists t1;
2 create table t1(f1 int);
3 insert into t1 values (5);
4 grant select on test.* to ssl_user1@localhost require SSL;
5 grant select on test.* to ssl_user2@localhost require cipher "DHE-RSA-AES256-SHA";
6 grant select on test.* to ssl_user3@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Uppsala/O=MySQL AB";
7 grant select on test.* to ssl_user4@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Uppsala/O=MySQL AB" ISSUER "/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB";
8 grant select on test.* to ssl_user5@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "xxx";
10 connect(localhost,ssl_user5,,test,MASTER_PORT,MASTER_SOCKET);
11 ERROR 28000: Access denied for user 'ssl_user5'@'localhost' (using password: NO)
12 SHOW STATUS LIKE 'Ssl_cipher';
14 Ssl_cipher DHE-RSA-AES256-SHA
19 ERROR 42000: DELETE command denied to user 'ssl_user1'@'localhost' for table 't1'
20 SHOW STATUS LIKE 'Ssl_cipher';
22 Ssl_cipher DHE-RSA-AES256-SHA
27 ERROR 42000: DELETE command denied to user 'ssl_user2'@'localhost' for table 't1'
28 SHOW STATUS LIKE 'Ssl_cipher';
30 Ssl_cipher DHE-RSA-AES256-SHA
35 ERROR 42000: DELETE command denied to user 'ssl_user3'@'localhost' for table 't1'
36 SHOW STATUS LIKE 'Ssl_cipher';
38 Ssl_cipher DHE-RSA-AES256-SHA
43 ERROR 42000: DELETE command denied to user 'ssl_user4'@'localhost' for table 't1'
44 drop user ssl_user1@localhost, ssl_user2@localhost,
45 ssl_user3@localhost, ssl_user4@localhost, ssl_user5@localhost;
47 mysqltest: Could not open connection 'default': 2026 SSL connection error: xxxx
48 mysqltest: Could not open connection 'default': 2026 SSL connection error: xxxx
49 mysqltest: Could not open connection 'default': 2026 SSL connection error: xxxx
50 SSL error: Unable to get private key from ''
51 mysqltest: Could not open connection 'default': 2026 SSL connection error
52 SSL error: Unable to get certificate from ''
53 mysqltest: Could not open connection 'default': 2026 SSL connection error
54 SHOW STATUS LIKE 'Ssl_cipher';
56 Ssl_cipher DHE-RSA-AES256-SHA
58 Ssl_cipher DHE-RSA-AES256-SHA
60 DROP TABLE IF EXISTS thread_status;
61 DROP EVENT IF EXISTS event_status;
62 SET GLOBAL event_scheduler=1;
63 CREATE EVENT event_status
65 ON COMPLETION NOT PRESERVE
68 CREATE TABLE thread_status
69 SELECT variable_name, variable_value
70 FROM information_schema.session_status
71 WHERE variable_name LIKE 'SSL_ACCEPTS' OR
72 variable_name LIKE 'SSL_CALLBACK_CACHE_HITS';
74 SELECT variable_name, variable_value FROM thread_status;
75 variable_name variable_value
77 SSL_CALLBACK_CACHE_HITS #
78 DROP TABLE thread_status;
79 SET GLOBAL event_scheduler=0;
80 SHOW STATUS LIKE 'Ssl_cipher';
83 SHOW STATUS LIKE 'Ssl_cipher';
86 mysqltest: Could not open connection 'default': 2026 SSL connection error
87 CREATE TABLE t1(a int);
88 INSERT INTO t1 VALUES (1), (2);
90 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
91 /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
92 /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
93 /*!40101 SET NAMES utf8 */;
94 /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
95 /*!40103 SET TIME_ZONE='+00:00' */;
96 /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
97 /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
98 /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
99 /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
100 DROP TABLE IF EXISTS `t1`;
101 /*!40101 SET @saved_cs_client = @@character_set_client */;
102 /*!40101 SET character_set_client = utf8 */;
104 `a` int(11) DEFAULT NULL
106 /*!40101 SET character_set_client = @saved_cs_client */;
108 LOCK TABLES `t1` WRITE;
109 /*!40000 ALTER TABLE `t1` DISABLE KEYS */;
110 INSERT INTO `t1` VALUES (1),(2);
111 /*!40000 ALTER TABLE `t1` ENABLE KEYS */;
113 /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
115 /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
116 /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
117 /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
118 /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
119 /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
120 /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
121 /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
124 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
125 /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
126 /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
127 /*!40101 SET NAMES utf8 */;
128 /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
129 /*!40103 SET TIME_ZONE='+00:00' */;
130 /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
131 /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
132 /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
133 /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
134 DROP TABLE IF EXISTS `t1`;
135 /*!40101 SET @saved_cs_client = @@character_set_client */;
136 /*!40101 SET character_set_client = utf8 */;
138 `a` int(11) DEFAULT NULL
140 /*!40101 SET character_set_client = @saved_cs_client */;
142 LOCK TABLES `t1` WRITE;
143 /*!40000 ALTER TABLE `t1` DISABLE KEYS */;
144 INSERT INTO `t1` VALUES (1),(2);
145 /*!40000 ALTER TABLE `t1` ENABLE KEYS */;
147 /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
149 /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
150 /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
151 /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
152 /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
153 /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
154 /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
155 /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
158 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
159 /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
160 /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
161 /*!40101 SET NAMES utf8 */;
162 /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
163 /*!40103 SET TIME_ZONE='+00:00' */;
164 /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
165 /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
166 /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
167 /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
168 DROP TABLE IF EXISTS `t1`;
169 /*!40101 SET @saved_cs_client = @@character_set_client */;
170 /*!40101 SET character_set_client = utf8 */;
172 `a` int(11) DEFAULT NULL
174 /*!40101 SET character_set_client = @saved_cs_client */;
176 LOCK TABLES `t1` WRITE;
177 /*!40000 ALTER TABLE `t1` DISABLE KEYS */;
178 INSERT INTO `t1` VALUES (1),(2);
179 /*!40000 ALTER TABLE `t1` ENABLE KEYS */;
181 /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
183 /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
184 /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
185 /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
186 /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
187 /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
188 /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
189 /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
191 SSL error: Unable to get private key from 'MYSQL_TEST_DIR/std_data/client-cert.pem'
192 mysqldump: Got error: 2026: SSL connection error when trying to connect
195 Ssl_cipher DHE-RSA-AES256-SHA
197 Ssl_cipher EDH-RSA-DES-CBC3-SHA
199 Ssl_cipher EDH-RSA-DES-CBC-SHA
202 select 'is still running; no cipher request crashed the server' as result from dual;
204 is still running; no cipher request crashed the server
205 GRANT SELECT ON test.* TO bug42158@localhost REQUIRE X509;
207 SHOW STATUS LIKE 'Ssl_cipher';
209 Ssl_cipher DHE-RSA-AES256-SHA
210 DROP USER bug42158@localhost;