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