1 '\" t |
|
2 .\" |
|
3 .\" CDDL HEADER START |
|
4 .\" |
|
5 .\" The contents of this file are subject to the terms of the |
|
6 .\" Common Development and Distribution License (the "License"). |
|
7 .\" You may not use this file except in compliance with the License. |
|
8 .\" |
|
9 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
|
10 .\" or http://www.opensolaris.org/os/licensing. |
|
11 .\" See the License for the specific language governing permissions |
|
12 .\" and limitations under the License. |
|
13 .\" |
|
14 .\" When distributing Covered Code, include this CDDL HEADER in each |
|
15 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
|
16 .\" If applicable, add the following below this CDDL HEADER, with the |
|
17 .\" fields enclosed by brackets "[]" replaced with your own identifying |
|
18 .\" information: Portions Copyright [yyyy] [name of copyright owner] |
|
19 .\" |
|
20 .\" CDDL HEADER END |
|
21 .\" |
|
22 .\" Copyright (c) 2009, 2011, Oracle and/or its affiliates. All rights reserved. |
|
23 .\" |
|
24 .TH "mysql_51" "1" "" "" "User Commands" |
|
25 .SH NAME |
|
26 MySQL 5.1 \- MySQL RDBMS version 5.1 for Solaris |
|
27 .SH DESCRIPTION |
|
28 |
|
29 MySQL version 5.1 for Solaris is delivered in the following |
|
30 3 packages: |
|
31 |
|
32 .TS |
|
33 box; |
|
34 cbp-1 | cbp-1 |
|
35 | | | . |
|
36 Package Contents |
|
37 = |
|
38 database/mysql-51 MySQL 5.1 Server package |
|
39 = |
|
40 database/mysql-51/library MySQL 5.1 lib package (lib component) |
|
41 = |
|
42 database/mysql-51/tests MySQL 5.1 test package |
|
43 .TE |
|
44 .PP |
|
45 |
|
46 The MySQL 5.1 software for Solaris is installed into a number of |
|
47 sub-directories of /usr/mysql/5.1. |
|
48 |
|
49 The database/mysql-51 package installs the following directories: |
|
50 |
|
51 .TS |
|
52 box; |
|
53 cbp-1 | cbp-1 |
|
54 | | | . |
|
55 Directory Contents |
|
56 = |
|
57 /usr/mysql/5.1/bin Binaries and Scripts |
|
58 = |
|
59 /usr/mysql/5.1/include Development header files |
|
60 = |
|
61 /usr/mysql/5.1/man/man1 Manual pages for client programs |
|
62 = |
|
63 /usr/mysql/5.1/man/man8 Manual pages for server programs |
|
64 = |
|
65 /usr/mysql/5.1/share Shared data:locale,timezone |
|
66 = |
|
67 /usr/mysql/5.1/docs HTML documentation |
|
68 |
|
69 .TE |
|
70 .PP |
|
71 |
|
72 The database/mysql-51 package also installs the following 64-bit directories |
|
73 .TP |
|
74 .ie t \(bu |
|
75 .el o |
|
76 \fB/usr/mysql/5.1/bin/64\fR - 64-bit |
|
77 Binaries and scripts |
|
78 .TP |
|
79 .ie t \(bu |
|
80 .el o |
|
81 .RE |
|
82 .sp |
|
83 .LP |
|
84 |
|
85 |
|
86 |
|
87 The following directories are additionally created by database/mysql-51 package |
|
88 |
|
89 .TS |
|
90 box; |
|
91 cbp-1 | cbp-1 |
|
92 | | | . |
|
93 Directory Contents |
|
94 = |
|
95 /var/mysql/5.1/data Default database data directory |
|
96 = |
|
97 /etc/mysql/5.1 Configuration file location |
|
98 |
|
99 .TE |
|
100 .PP |
|
101 |
|
102 The database/mysql-51 package also installs the following SMF files to facilitate automatic service management |
|
103 (refer to smf(5) and the SMF section below): |
|
104 .RS |
|
105 .PP |
|
106 .br |
|
107 /lib/svc/manifest/application/database/mysql_51.xml |
|
108 ./br |
|
109 /lib/svc/method/mysql_51 |
|
110 .RE |
|
111 .PP |
|
112 |
|
113 The database/mysql-51/tests package creates the following directories: |
|
114 .TS |
|
115 box; |
|
116 cbp-1 | cbp-1 |
|
117 | | | . |
|
118 Directory Contents |
|
119 = |
|
120 /usr/mysql/5.1/mysql-test MySQL test programs |
|
121 = |
|
122 /usr/mysql/5.1/sql-bench SQL Benchmark test |
|
123 |
|
124 .TE |
|
125 .PP |
|
126 |
|
127 The database/mysql-51/library package contains the libraries for client API: |
|
128 .TS |
|
129 box; |
|
130 cbp-1 | cbp-1 |
|
131 | | | . |
|
132 Directory Contents |
|
133 = |
|
134 /usr/mysql/5.1/lib Libraries for client API |
|
135 = |
|
136 /usr/mysql/5.1/lib/64 64-bit Libraries for client API |
|
137 |
|
138 .TE |
|
139 .PP |
|
140 .SH DTrace SUPPORT for MySQL SERVER |
|
141 MySQL 5.1 provides for the DTrace support at the time of the mysql server startup. |
|
142 MySQL server registers the probes for the provider mysql. |
|
143 |
|
144 .br |
|
145 Probes that are used at the time of creating and closing of client connection are |
|
146 .sp |
|
147 .LP |
|
148 probe connection-start(); |
|
149 .br |
|
150 probe connection-done(); |
|
151 .sp |
|
152 .LP |
|
153 .br |
|
154 |
|
155 Probes that fire at the start/end of any client command processing (including SQL queries) |
|
156 .sp |
|
157 .LP |
|
158 probe command-start(); |
|
159 .br |
|
160 probe command-done(); |
|
161 .sp |
|
162 .LP |
|
163 .br |
|
164 |
|
165 Probes that fire at the start/end of any SQL query processing. |
|
166 .sp |
|
167 .LP |
|
168 probe query-start(); |
|
169 .br |
|
170 probe query-done(); |
|
171 .sp |
|
172 .LP |
|
173 .br |
|
174 Probes that fire at the start/end of SQL query parsing |
|
175 .sp |
|
176 .LP |
|
177 probe query-parse-start(); |
|
178 .br |
|
179 probe query-parse-done(); |
|
180 .sp |
|
181 .LP |
|
182 .br |
|
183 Probes that track whether the query hits the query cache or not |
|
184 .sp |
|
185 .LP |
|
186 probe query-cache-hit(); |
|
187 .br |
|
188 probe query-cache-miss(); |
|
189 .sp |
|
190 .LP |
|
191 .br |
|
192 Probes that fire when the actual query exectuion start,ie after parsing |
|
193 and checking the query cache, but before privilege checks,optimizing etc. |
|
194 .sp |
|
195 .LP |
|
196 probe query-exec-start(); |
|
197 .br |
|
198 probe query-exec-done(); |
|
199 .sp |
|
200 .LP |
|
201 .br |
|
202 Probes that are used to perform to write operations towards any handler are as listed below |
|
203 .sp |
|
204 .LP |
|
205 probe insert-row-start(); |
|
206 .br |
|
207 probe insert-row-done(); |
|
208 .br |
|
209 probe update-row-start(); |
|
210 .br |
|
211 probe update-row-done(); |
|
212 .br |
|
213 probe delete-row-start(); |
|
214 .br |
|
215 probe delete-row-done(); |
|
216 .sp |
|
217 .LP |
|
218 .br |
|
219 |
|
220 probe is activated when calling external_lock for any handler depending on the lock type being acquired |
|
221 or released |
|
222 .sp |
|
223 .LP |
|
224 .br |
|
225 probe handler-rdlock-start(); |
|
226 .br |
|
227 probe handler-rdlock-done(); |
|
228 .br |
|
229 probe handler-wlock-start(); |
|
230 .br |
|
231 probe handler-wrlock-done(); |
|
232 .br |
|
233 probe handler-unlock-start(); |
|
234 .br |
|
235 probe handler-unlock-done(); |
|
236 .sp |
|
237 .LP |
|
238 .br |
|
239 probes are activated when a filesort activity happens in a query |
|
240 .sp |
|
241 .LP |
|
242 probe filesort-start(); |
|
243 .br |
|
244 probe filesort-end(); |
|
245 .sp |
|
246 .LP |
|
247 .br |
|
248 The query types SELECT, INSERT, INSERT AS SELECT, UPDATE, UPDATE with |
|
249 multiple tables, DELETE, DELETE with multiple tables are all probed. |
|
250 The start probe always contains the query text |
|
251 .sp |
|
252 .LP |
|
253 probe select-start(char *query); |
|
254 .br |
|
255 probe select-done(); |
|
256 .br |
|
257 probe insert-start(char *query); |
|
258 .br |
|
259 probe insert-end(); |
|
260 .br |
|
261 probe insert-select-start(char *query); |
|
262 .br |
|
263 probe insert-select-done(); |
|
264 .br |
|
265 probe update-start(char *query); |
|
266 .br |
|
267 probe update-done(); |
|
268 .br |
|
269 probe multi-update-start(char *query); |
|
270 .br |
|
271 probe multi-update-done(); |
|
272 .br |
|
273 probe delete-start(char *query); |
|
274 .br |
|
275 probe delete-done(); |
|
276 .br |
|
277 probe multi-delete-start(char *query); |
|
278 .br |
|
279 probe multi-delete-done(); |
|
280 .sp |
|
281 .LP |
|
282 .br |
|
283 These probes are used to measure the time waiting for network traffic |
|
284 or identify network-related problems |
|
285 .sp |
|
286 .LP |
|
287 probe net-read-start(); |
|
288 .br |
|
289 probe net-read-done(); |
|
290 .br |
|
291 probe net-write-start(); |
|
292 .br |
|
293 probe net-write-done(); |
|
294 .br |
|
295 |
|
296 .SH AUTOMATIC SERVICE MANAGEMENT (SMF) |
|
297 MySQL 5.1 for Solaris includes files necessary to register with the |
|
298 service management facility described in smf(5). |
|
299 |
|
300 After installation of the database/mysql-51 package, register the MySQL service as under: |
|
301 |
|
302 .br |
|
303 example%svccfg import |
|
304 /lib/svc/manifest/application/database/mysql_51.xml |
|
305 |
|
306 The mysql:version_51 service is disabled by default. You can check the status of the service by issuing the following command : |
|
307 |
|
308 .br |
|
309 example% svcs mysql |
|
310 .br |
|
311 STATE STIME FMRI |
|
312 .br |
|
313 disabled 14:27:09 svc:/application/database/mysql:version_51 |
|
314 |
|
315 |
|
316 Enable the mysql:version_51 service by issuing the following command : |
|
317 |
|
318 .br |
|
319 example%svcadm enable mysql:version_51 |
|
320 |
|
321 The state of the service instance should change to "online", and the database server should be started : |
|
322 |
|
323 .br |
|
324 example% svcs mysql |
|
325 .br |
|
326 STATE STIME FMRI |
|
327 .br |
|
328 online 14:30:08 svc:/application/database/mysql:version_51 |
|
329 |
|
330 .br |
|
331 |
|
332 The 32-bit MySQL daemon runs by default. To start the 64-bit |
|
333 server, execute the following commands: |
|
334 .sp |
|
335 .LP |
|
336 \fB%svccfg\fR |
|
337 .sp |
|
338 .LP |
|
339 \fBsvc>select mysql:version_51\fR |
|
340 .sp |
|
341 .LP |
|
342 \fBsvc:/application/database/mysql:version_51>listprop mysql/enable_64bit\fR |
|
343 .sp |
|
344 .LP |
|
345 \fBmysql/enable_64bit boolean false\fR |
|
346 .sp |
|
347 .LP |
|
348 \fBsvc:/application/database/mysql:version_51>setprop mysql/enable_64bit=true\fR |
|
349 .sp |
|
350 .LP |
|
351 \fBsvc:/application/database/mysql:version_51>listprop mysql/enable_64bit\fR |
|
352 .sp |
|
353 .LP |
|
354 \fBmysql/enable_64bit boolean true\fR |
|
355 .sp |
|
356 .LP |
|
357 \fBsvc:/application/database/mysql:version_51>quit\fR |
|
358 .sp |
|
359 .LP |
|
360 \fB%svcadm refresh mysql:version_51\fR |
|
361 .sp |
|
362 .LP |
|
363 \fB%svcadm enable mysql:version_51\fR |
|
364 .sp |
|
365 .LP |
|
366 The 64-bit server is initiated. |
|
367 .sp |
|
368 |
|
369 .sp |
|
370 .TS |
|
371 tab(^G); |
|
372 lw(.95i) lw(.79i) lw(3.76i) |
|
373 lw(.95i) lw(.79i) lw(3.76i) |
|
374 . |
|
375 STATE STIME FMRI |
|
376 .br |
|
377 online 15.10:08 svc:/application/database/mysql:version_51 |
|
378 |
|
379 .br |
|
380 |
|
381 |
|
382 .TE |
|
383 |
|
384 .LP |
|
385 Note - |
|
386 .sp |
|
387 .RS 2 |
|
388 By default, the \fBmysql/enable_64bit\fR property |
|
389 is set to \fBFalse\fR. Set it \fBTrue\fR to start |
|
390 the 64-bit server. |
|
391 .RE |
|
392 .sp |
|
393 .LP |
|
394 To shutdown the database instance and prevent automatic restart (for example |
|
395 during scheduled downtime for maintenance), disable the SMF service by running: |
|
396 |
|
397 example% svcadm disable mysql:version_51 |
|
398 .br |
|
399 example% svcs mysql |
|
400 .br |
|
401 STATE STIME FMRI |
|
402 .br |
|
403 disabled 14:30:08 svc:/application/database/mysql:version_51 |
|
404 |
|
405 .br |
|
406 |
|
407 .RE |
|
408 |
|
409 .SH REFERENCES |
|
410 .PP |
|
411 http://www.mysql.com |
|