~ubuntu-branches/ubuntu/hardy/autoconf-archive/hardy

« back to all changes in this revision

Viewing changes to htmldoc/ac_prog_mysqladmin.html

  • Committer: Bazaar Package Importer
  • Author(s): Martin A. Godisch
  • Date: 2004-06-26 09:43:57 UTC
  • Revision ID: james.westby@ubuntu.com-20040626094357-3be3jwcz1vcdhpe8
Tags: upstream-20040616
ImportĀ upstreamĀ versionĀ 20040616

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
 
2
"http://www.w3.org/TR/html4/strict.dtd">
 
3
 
 
4
<html lang="en">
 
5
<head>
 
6
  <title>Autoconf Macro: ac_prog_mysqladmin</title>
 
7
  <link rel="stylesheet" type="text/css" href="ac-archive.css">
 
8
</head>
 
9
 
 
10
<body>
 
11
  <table summary="web navigation" style="width:100%;">
 
12
    <tbody>
 
13
      <tr>
 
14
        <td style="width:50%;" align="center">[<a href="index.html">Macro Index
 
15
        Page</a>]</td>
 
16
 
 
17
        <td style="width:50%;" align="center">[<a href=
 
18
        "../m4source/ac_prog_mysqladmin.m4">Download M4 Source</a>]</td>
 
19
      </tr>
 
20
    </tbody>
 
21
  </table>
 
22
  <hr>
 
23
 
 
24
  <h1>ac_prog_mysqladmin</h1>
 
25
 
 
26
  <h2>Synopsis</h2>
 
27
 
 
28
  <div class="indent">
 
29
    <p style="text-align:left; white-space:nowrap;">
 
30
    <code>AC_PROG_MYSQLADMIN</code></p>
 
31
  </div>
 
32
 
 
33
  <h2>Description</h2>
 
34
 
 
35
  <div class="indent">
 
36
    <p>Check for the program 'mysqladmin' let script continue if exists &amp;
 
37
    works pops up error message if not.</p>
 
38
 
 
39
    <p>Testing of functionality is by invoking it with root password 'rootpass'
 
40
    and a 'flush-privileges' command.</p>
 
41
 
 
42
    <p>Besides checking mysql, this macro also set these environment variables
 
43
    upon completion:</p>
 
44
    <pre>
 
45
 MYSQLADMIN = which mysqladmin
 
46
    MYSQL_DATADIR = directory containing mysql database
 
47
</pre>
 
48
  </div>
 
49
 
 
50
  <h2>Version</h2>
 
51
 
 
52
  <div class="indent">
 
53
    <p>1.4 (last modified: 2003-01-09)</p>
 
54
  </div>
 
55
 
 
56
  <h2>Author</h2>
 
57
 
 
58
  <div class="indent">
 
59
    <p>Gleen Salmon &lt;gleensalmon@yahoo.com&gt;</p>
 
60
  </div>
 
61
 
 
62
  <h2>M4 Source Code</h2>
 
63
 
 
64
  <div class="indent">
 
65
    <pre class="m4source">
 
66
AC_DEFUN([AC_PROG_MYSQLADMIN],[
 
67
AC_REQUIRE([AC_EXEEXT])dnl
 
68
AC_PATH_PROG(MYSQLADMIN, mysqladmin$EXEEXT, nocommand)
 
69
if test "$MYSQLADMIN" = nocommand; then
 
70
        AC_MSG_ERROR([mysqladmin not found in $PATH])
 
71
fi
 
72
AC_MSG_CHECKING([if mysqladmin works])
 
73
if $MYSQLADMIN -u root -prootpass flush-privileges; then
 
74
        AC_MSG_RESULT([yes])
 
75
else
 
76
        AC_MSG_NOTICE([Before installation, set MySQL root password to rootpass; restore your root password afterwards.])
 
77
        AC_MSG_ERROR([mysqladmin cannot run with root password = rootpass])
 
78
fi
 
79
DATADIR_PATTERN='^|[[[:blank:]]]*datadir[[[:blank:]]]*|[[[:blank:]]]*\([[^[:blank:]]][[^[:blank:]]]*\)[[[:blank:]]]*|'
 
80
MYSQL_DATADIR=`$MYSQLADMIN -u root -prootpass variables 2&gt; /dev/null | grep $DATADIR_PATTERN | sed "s/$DATADIR_PATTERN/\1/"`;dnl
 
81
])
 
82
</pre>
 
83
  </div>
 
84
 
 
85
  <h2>Copyright</h2>
 
86
 
 
87
  <div class="indent">
 
88
    <a href="COPYING.html">GNU General Public License</a> with this special
 
89
    <a href="COPYING-Exception.html">exception</a>.
 
90
  </div>
 
91
</body>
 
92
</html>