~ubuntu-branches/ubuntu/wily/mysql-5.6/wily

« back to all changes in this revision

Viewing changes to Docs/INSTALL-BINARY

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2015-04-16 20:07:10 UTC
  • mfrom: (1.2.5)
  • mto: This revision was merged to the branch mainline in revision 11.
  • Revision ID: package-import@ubuntu.com-20150416200710-pfv24hkypwgmv7h6
* SECURITY UPDATE: Update to 5.5.41 to fix security issues (LP: #1444616)
  - http://www.oracle.com/technetwork/topics/security/cpuapr2015-2365600.html
  - CVE-2015-0498
  - CVE-2015-0499
  - CVE-2015-0500
  - CVE-2015-0501
  - CVE-2015-0503
  - CVE-2015-0505
  - CVE-2015-0506
  - CVE-2015-0507
  - CVE-2015-0508
  - CVE-2015-0511
  - CVE-2015-2567
  - CVE-2015-2571
* debian/rules: fix ftbfs by building the sql directory first so the
  required files are generated.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
2.2 Installing MySQL on Unix/Linux Using Generic Binaries
2
2
 
3
3
   Oracle provides a set of binary distributions of MySQL. These
4
 
   include binary distributions in the form of compressed tar
5
 
   files (files with a .tar.gz extension) for a number of
6
 
   platforms, as well as binaries in platform-specific package
7
 
   formats for selected platforms.
 
4
   include generic binary distributions in the form of
 
5
   compressed tar files (files with a .tar.gz extension) for a
 
6
   number of platforms, and binaries in platform-specific
 
7
   package formats for selected platforms.
8
8
 
9
9
   This section covers the installation of MySQL from a
10
10
   compressed tar file binary distribution. For other
13
13
   distributions, see Section 2.3, "Installing MySQL on
14
14
   Microsoft Windows."
15
15
 
16
 
   To obtain MySQL, see Section 2.1.3, "How to Get MySQL."
 
16
   To obtain MySQL, see Section 2.1.2, "How to Get MySQL."
17
17
 
18
18
   MySQL compressed tar file binary distributions have names of
19
19
   the form mysql-VERSION-OS.tar.gz, where VERSION is a number
20
 
   (for example, 5.6.23), and OS indicates the type of operating
 
20
   (for example, 5.6.25), and OS indicates the type of operating
21
21
   system for which the distribution is intended (for example,
22
22
   pc-linux-i686 or winx64).
23
 
 
24
 
   To install MySQL from a compressed tar file binary
25
 
   distribution, your system must have GNU gunzip to uncompress
26
 
   the distribution and a reasonable tar to unpack it. If your
27
 
   tar program supports the z option, it can both uncompress and
28
 
   unpack the file.
29
 
 
30
 
   GNU tar is known to work. The standard tar provided with some
31
 
   operating systems is not able to unpack the long file names
32
 
   in the MySQL distribution. You should download and install
33
 
   GNU tar, or if available, use a preinstalled version of GNU
34
 
   tar. Usually this is available as gnutar, gtar, or as tar
35
 
   within a GNU or Free Software directory, such as /usr/sfw/bin
36
 
   or /usr/local/bin. GNU tar is available from
37
 
   http://www.gnu.org/software/tar/.
38
23
   Warning
39
24
 
40
25
   If you have previously installed MySQL using your operating
41
26
   system native package management system, such as yum or
42
27
   apt-get, you may experience problems installing using a
43
 
   native binary. Make sure your previous MySQL previous
44
 
   installation has been removed entirely (using your package
45
 
   management system), and that any additional files, such as
46
 
   old versions of your data files, have also been removed. You
47
 
   should also check the existence of configuration files such
48
 
   as /etc/my.cnf or the /etc/mysql directory have been deleted.
 
28
   native binary. Make sure your previous MySQL installation has
 
29
   been removed entirely (using your package management system),
 
30
   and that any additional files, such as old versions of your
 
31
   data files, have also been removed. You should also check for
 
32
   configuration files such as /etc/my.cnf or the /etc/mysql
 
33
   directory and delete them.
 
34
 
 
35
   For information about replacing third-party packages with
 
36
   official MySQL packages, see the related Apt guide
 
37
   (http://dev.mysql.com/doc/mysql-apt-repo-quick-guide/en/) or
 
38
   Yum guide.
49
39
   Warning
50
40
 
51
41
   MySQL has a dependency on the libaio library. The
72
62
   Table 2.3 MySQL Installation Layout for Generic Unix/Linux
73
63
   Binary Package
74
64
   Directory Contents of Directory
75
 
   bin Client programs and the mysqld server
 
65
   bin, scripts mysqld server, client and utility programs
76
66
   data Log files, databases
77
 
   docs Manual in Info format
 
67
   docs MySQL manual in Info format
78
68
   man Unix manual pages
79
69
   include Include (header) files
80
70
   lib Libraries
81
 
   scripts mysql_install_db
82
71
   share Miscellaneous support files, including error messages,
83
72
   sample configuration files, SQL for database installation
84
73
   sql-bench Benchmarks
86
75
   Debug versions of the mysqld binary are available as
87
76
   mysqld-debug. To compile your own debug version of MySQL from
88
77
   a source distribution, use the appropriate configuration
89
 
   options to enable debugging support. For more information on
90
 
   compiling from source, see Section 2.9, "Installing MySQL
91
 
   from Source."
 
78
   options to enable debugging support. See Section 2.9,
 
79
   "Installing MySQL from Source."
92
80
 
93
 
   To install and use a MySQL binary distribution, the basic
94
 
   command sequence looks like this:
 
81
   To install and use a MySQL binary distribution, the command
 
82
   sequence looks like this:
95
83
shell> groupadd mysql
96
84
shell> useradd -r -g mysql mysql
97
85
shell> cd /usr/local
107
95
# Next command is optional
108
96
shell> cp support-files/mysql.server /etc/init.d/mysql.server
109
97
 
110
 
   mysql_install_db creates a default option file named my.cnf
111
 
   in the base installation directory. This file is created from
112
 
   a template included in the distribution package named
113
 
   my-default.cnf. For more information, see Section 5.1.2.2,
114
 
   "Using a Sample Default Server Configuration File."
115
 
 
116
 
   A more detailed version of the preceding description for
117
 
   installing a binary distribution follows.
118
98
   Note
119
99
 
120
100
   This procedure assumes that you have root (administrator)
121
101
   access to your system. Alternatively, you can prefix each
122
102
   command using the sudo (Linux) or pfexec (OpenSolaris)
123
103
   command.
124
 
 
125
 
   The procedure does not set up any passwords for MySQL
126
 
   accounts. After following the procedure, proceed to Section
127
 
   2.10.2, "Securing the Initial MySQL Accounts."
 
104
   Note
 
105
 
 
106
   The procedure does not assign passwords to MySQL accounts. To
 
107
   do so, use the instructions in Section 2.10.4, "Securing the
 
108
   Initial MySQL Accounts."
 
109
 
 
110
   As of MySQL 5.6.8, mysql_install_db creates a default option
 
111
   file named my.cnf in the base installation directory. This
 
112
   file is created from a template included in the distribution
 
113
   package named my-default.cnf. For more information, see
 
114
   Section 5.1.2.2, "Using a Sample Default Server Configuration
 
115
   File."
 
116
 
 
117
   A more detailed version of the preceding description for
 
118
   installing a binary distribution follows.
128
119
 
129
120
Create a mysql User and Group
130
121
 
131
 
   If your system does not already have a user and group for
132
 
   mysqld to run as, you may need to create one. The following
 
122
   If your system does not already have a user and group to use
 
123
   for running mysqld, you may need to create one. The following
133
124
   commands add the mysql group and the mysql user. You might
134
125
   want to call the user and group something else instead of
135
126
   mysql. If so, substitute the appropriate name in the
144
135
   Because the user is required only for ownership purposes, not
145
136
   login purposes, the useradd command uses the -r option to
146
137
   create a user that does not have login permissions to your
147
 
   server host. Omit this option to permit logins for the user
148
 
   (or if your useradd does not support the option).
 
138
   server host. Omit this option to permit logins for the user,
 
139
   or if your useradd does not support the option.
149
140
 
150
141
Obtain and Unpack the Distribution
151
142
 
158
149
shell> cd /usr/local
159
150
 
160
151
   Obtain a distribution file using the instructions in Section
161
 
   2.1.3, "How to Get MySQL." For a given release, binary
 
152
   2.1.2, "How to Get MySQL." For a given release, binary
162
153
   distributions for all platforms are built from the same MySQL
163
154
   source distribution.
164
155
 
174
165
   enables you to refer more easily to the installation
175
166
   directory as /usr/local/mysql.
176
167
 
 
168
   To install MySQL from a compressed tar file binary
 
169
   distribution, your system must have GNU gunzip to uncompress
 
170
   the distribution and a reasonable tar to unpack it. If your
 
171
   tar program supports the z option, it can both uncompress and
 
172
   unpack the file.
 
173
 
 
174
   GNU tar is known to work. The standard tar provided with some
 
175
   operating systems is not able to unpack the long file names
 
176
   in the MySQL distribution. You should download and install
 
177
   GNU tar, or if available, use a preinstalled version of GNU
 
178
   tar. Usually this is available as gnutar, gtar, or as tar
 
179
   within a GNU or Free Software directory, such as /usr/sfw/bin
 
180
   or /usr/local/bin. GNU tar is available from
 
181
   http://www.gnu.org/software/tar/.
 
182
 
177
183
   If your tar does not have z option support, use gunzip to
178
184
   unpack the distribution and tar to unpack it. Replace the
179
185
   preceding tar command with the following alternative command
182
188
 
183
189
Perform Postinstallation Setup
184
190
 
185
 
   The remainder of the installation process involves setting up
186
 
   the configuration file, creating the core databases, and
187
 
   starting the MySQL server. For next steps, see Section 2.10,
 
191
   The remainder of the installation process involves setting
 
192
   distribution ownership and access permissions, initializing
 
193
   the data directory, starting the MySQL server, and setting up
 
194
   the configuration file. For instructions, see Section 2.10,
188
195
   "Postinstallation Setup and Testing."
189
 
   Note
190
 
 
191
 
   The accounts that are listed in the MySQL grant tables
192
 
   initially have no passwords. After starting the server, you
193
 
   should set up passwords for them using the instructions in
194
 
   Section 2.10.2, "Securing the Initial MySQL Accounts."
195
196
2.3 Installing MySQL on Microsoft Windows
196
197
 
197
198
   There are several different methods to install MySQL on
290
291
       for you.
291
292
 
292
293
   MySQL distributions for Windows can be downloaded from
293
 
   http://dev.mysql.com/downloads/. See Section 2.1.3, "How to
 
294
   http://dev.mysql.com/downloads/. See Section 2.1.2, "How to
294
295
   Get MySQL."
295
296
 
296
297
   MySQL for Windows is available in several distribution
297
 
   formats, detailed below. Generally speaking, you should use
 
298
   formats, detailed here. Generally speaking, you should use
298
299
   MySQL Installer. It contains more features and MySQL products
299
 
   than the older MSI, is simpler to use than the ZIP file, and
 
300
   than the older MSI, is simpler to use than the Zip file, and
300
301
   you need no additional tools to get MySQL up and running.
301
302
   MySQL Installer automatically installs MySQL Server and
302
303
   additional MySQL products, creates an options file, starts
374
375
   Table 2.4 Default MySQL Installation Layout for Microsoft
375
376
   Windows
376
377
   Directory Contents of Directory Notes
377
 
   bin Client programs and the mysqld server
 
378
   bin, scripts mysqld server, client and utility programs
378
379
   %ALLUSERSPROFILE%\MySQL\MySQL Server 5.6\ Log files,
379
380
   databases (Windows XP, Windows Server 2003) The Windows
380
381
   system variable %ALLUSERSPROFILE% defaults to C:\Documents
386
387
   examples Example programs and scripts
387
388
   include Include (header) files
388
389
   lib Libraries
389
 
   scripts Utility scripts
390
390
   share Miscellaneous support files, including error messages,
391
391
   character set files, sample configuration files, SQL for
392
392
   database installation
406
406
   choose from when installing MySQL on Windows:
407
407
 
408
408
     * MySQL Installer: This package has a file name similar to
409
 
       mysql-installer-community-5.6.23.0.msi or
410
 
       mysql-installer-commercial-5.6.23.0.msi, and utilizes
 
409
       mysql-installer-community-5.6.25.0.msi or
 
410
       mysql-installer-commercial-5.6.25.0.msi, and utilizes
411
411
       MSIs to automatically install MySQL server and other
412
412
       products. It will download and apply updates to itself,
413
413
       and for each of the installed products. It also
431
431
       Microsoft Windows Using MySQL Installer."
432
432
 
433
433
     * The Noinstall Archive: This package has a file name
434
 
       similar to mysql-5.6.23-win32.zip or
435
 
       mysql-5.6.23-winx64.zip, and contains all the files found
 
434
       similar to mysql-5.6.25-win32.zip or
 
435
       mysql-5.6.25-winx64.zip, and contains all the files found
436
436
       in the Complete install package, with the exception of
437
437
       the GUI. This package does not include an automated
438
438
       installer, and must be manually installed and configured.
883
883
 
884
884
2.3.3.1.3 Alter MySQL Products
885
885
 
886
 
   MySQL Installer offers several options to alter your MySQL
887
 
   product installations.
 
886
   Use MySQL Installer to modify, configure, or upgrade your
 
887
   MySQL product installations.
888
888
 
889
889
Upgrade
890
890
 
891
 
   MySQL products with an available upgrade are highlighted on
892
 
   the main dashboard. Products with available upgrades will
893
 
   have an upgrade icon next to their version number.
 
891
   Upgradable MySQL products are listed on the main dashboard
 
892
   with an arrow icon ( [wb-icon-upgrade-arrow.png] ) next to
 
893
   their version number.
894
894
 
895
895
   Figure 2.25 MySQL Installer - Upgrade a MySQL Product
896
896
   MySQL Installer - Upgrade a MySQL Product
897
897
   Note
898
898
 
899
 
   Available upgrades are determined by having a current
900
 
   catalog. For information about keeping your MySQL product
901
 
   catalog current, see Section 2.3.3.1.1, "MySQL Product
902
 
   Catalog."
 
899
   The "upgrade" functionality requires a current product
 
900
   catalog. This catalog is updated either manually or
 
901
   automatically (daily) by enabling the Automatic Catalog
 
902
   Update feature. For additional information, see Section
 
903
   2.3.3.1.1, "MySQL Product Catalog."
903
904
 
904
 
   Click Upgrade to view a list upgradable products. Our example
905
 
   indicates that MySQL server 5.6.19 can be upgraded to version
906
 
   5.6.20.
 
905
   Click Upgrade to upgrade the available products. Our example
 
906
   indicates that MySQL Workbench 6.2.4 can be upgraded version
 
907
   6.3.1 or 6.2.5, and MySQL server from 5.5.41 to 5.5.42.
907
908
 
908
909
   Figure 2.26 MySQL Installer - Select Products To Upgrade
909
910
   MySQL Installer - Select Products To Upgrade
910
911
 
911
 
   Select (check) the products to upgrade, and optionally click
912
 
   the changes link to view the product's release notes in your
913
 
   browser. Click Next to begin the upgrade process.
 
912
   If multiple upgrade versions are available (such as our MySQL
 
913
   Workbench example above), select the desired version for the
 
914
   upgrade in the Available Upgrades area.
 
915
   Note
 
916
 
 
917
   Optionally, click the Changes link to view the version's
 
918
   release notes.
 
919
 
 
920
   After selecting (checking) the products and versions to
 
921
   upgrade, click Next to begin the upgrade process.
914
922
 
915
923
   Figure 2.27 MySQL Installer - Apply Updates
916
924
   MySQL Installer - Apply Updates
1613
1621
   To install MySQL manually, do the following:
1614
1622
 
1615
1623
    1. If you are upgrading from a previous version please refer
1616
 
       to Section 2.3.7, "Upgrading MySQL on Windows," before
 
1624
       to Section 2.3.8, "Upgrading MySQL on Windows," before
1617
1625
       beginning the upgrade process.
1618
1626
 
1619
1627
    2. Make sure that you are logged in as a user with
1821
1829
   something like this, which indicates that the server is ready
1822
1830
   to service client connections:
1823
1831
mysqld: ready for connections
1824
 
Version: '5.6.23'  socket: ''  port: 3306
 
1832
Version: '5.6.25'  socket: ''  port: 3306
1825
1833
 
1826
1834
   The server continues to write to the console any further
1827
1835
   diagnostic output it produces. You can open a new console
1837
1845
   The accounts that are listed in the MySQL grant tables
1838
1846
   initially have no passwords. After starting the server, you
1839
1847
   should set up passwords for them using the instructions in
1840
 
   Section 2.10.2, "Securing the Initial MySQL Accounts."
 
1848
   Section 2.10.4, "Securing the Initial MySQL Accounts."
1841
1849
 
1842
1850
2.3.5.5 Starting MySQL from the Windows Command Line
1843
1851
 
2160
2168
   client programs, there is probably a problem with your DNS.
2161
2169
   In this case, start mysqld with the --skip-name-resolve
2162
2170
   option and use only localhost and IP addresses in the Host
2163
 
   column of the MySQL grant tables.
 
2171
   column of the MySQL grant tables. (Be sure that an account
 
2172
   exists that specifies an IP address or you may not be able to
 
2173
   connect.)
2164
2174
 
2165
2175
   You can force a MySQL client to use a named-pipe connection
2166
2176
   rather than TCP/IP by specifying the --pipe or
2292
2302
       http://www.microsoft.com/windows2000/techinfo/reskit/tool
2293
2303
       s/existing/delsrv-o.asp and use the delsrv mysql syntax.
2294
2304
 
2295
 
2.3.7 Upgrading MySQL on Windows
 
2305
2.3.7 Windows Postinstallation Procedures
 
2306
 
 
2307
   GUI tools exist that perform most of the tasks described in
 
2308
   this section, including:
 
2309
 
 
2310
     * MySQL Installer: Used to install and upgrade MySQL
 
2311
       products.
 
2312
 
 
2313
     * MySQL Workbench: Manages the MySQL server and edits SQL
 
2314
       statements.
 
2315
 
 
2316
     * MySQL Notifier: Starts, stops, or restarts the MySQL
 
2317
       server, and monitors its status.
 
2318
 
 
2319
     * MySQL for Excel
 
2320
       (http://dev.mysql.com/doc/mysql-for-excel/en/index.html):
 
2321
       Edits MySQL data with Microsoft Excel.
 
2322
 
 
2323
   On Windows, you need not create the data directory and the
 
2324
   grant tables. MySQL Windows distributions include the grant
 
2325
   tables with a set of preinitialized accounts in the mysql
 
2326
   database under the data directory.
 
2327
 
 
2328
   Regarding passwords, if you installed MySQL using the MySQL
 
2329
   Installer, you may have already assigned passwords to the
 
2330
   accounts. (See Section 2.3.3, "Installing MySQL on Microsoft
 
2331
   Windows Using MySQL Installer.") Otherwise, use the
 
2332
   password-assignment procedure given in Section 2.10.4,
 
2333
   "Securing the Initial MySQL Accounts."
 
2334
 
 
2335
   Before assigning passwords, you might want to try running
 
2336
   some client programs to make sure that you can connect to the
 
2337
   server and that it is operating properly. Make sure that the
 
2338
   server is running (see Section 2.3.5.4, "Starting the Server
 
2339
   for the First Time"). You can also set up a MySQL service
 
2340
   that runs automatically when Windows starts (see Section
 
2341
   2.3.5.7, "Starting MySQL as a Windows Service").
 
2342
 
 
2343
   These instructions assume that your current location is the
 
2344
   MySQL installation directory and that it has a bin
 
2345
   subdirectory containing the MySQL programs used here. If that
 
2346
   is not true, adjust the command path names accordingly.
 
2347
 
 
2348
   If you installed MySQL using MySQL Installer (see Section
 
2349
   2.3.3, "Installing MySQL on Microsoft Windows Using MySQL
 
2350
   Installer"), the default installation directory is C:\Program
 
2351
   Files\MySQL\MySQL Server 5.6:
 
2352
C:\> cd "C:\Program Files\MySQL\MySQL Server 5.6"
 
2353
 
 
2354
   A common installation location for installation from a Zip
 
2355
   package is C:\mysql:
 
2356
C:\> cd C:\mysql
 
2357
 
 
2358
   Alternatively, add the bin directory to your PATH environment
 
2359
   variable setting. That enables your command interpreter to
 
2360
   find MySQL programs properly, so that you can run a program
 
2361
   by typing only its name, not its path name. See Section
 
2362
   2.3.5.6, "Customizing the PATH for MySQL Tools."
 
2363
 
 
2364
   With the server running, issue the following commands to
 
2365
   verify that you can retrieve information from the server. The
 
2366
   output should be similar to that shown here.
 
2367
 
 
2368
   Use mysqlshow to see what databases exist:
 
2369
C:\> bin\mysqlshow
 
2370
+--------------------+
 
2371
|     Databases      |
 
2372
+--------------------+
 
2373
| information_schema |
 
2374
| mysql              |
 
2375
| test               |
 
2376
+--------------------+
 
2377
 
 
2378
   The list of installed databases may vary, but will always
 
2379
   include the minimum of mysql and information_schema.
 
2380
 
 
2381
   The preceding command (and commands for other MySQL programs
 
2382
   such as mysql) may not work if the correct MySQL account does
 
2383
   not exist. For example, the program may fail with an error,
 
2384
   or you may not be able to view all databases. If you
 
2385
   installed MySQL using MySQL Installer, the root user will
 
2386
   have been created automatically with the password you
 
2387
   supplied. In this case, you should use the -u root and -p
 
2388
   options. (You must use those options if you have already
 
2389
   secured the initial MySQL accounts.) With -p, the client
 
2390
   program prompts for the root password. For example:
 
2391
C:\> bin\mysqlshow -u root -p
 
2392
Enter password: (enter root password here)
 
2393
+--------------------+
 
2394
|     Databases      |
 
2395
+--------------------+
 
2396
| information_schema |
 
2397
| mysql              |
 
2398
| test               |
 
2399
+--------------------+
 
2400
 
 
2401
   If you specify a database name, mysqlshow displays a list of
 
2402
   the tables within the database:
 
2403
C:\> bin\mysqlshow mysql
 
2404
Database: mysql
 
2405
+---------------------------+
 
2406
|          Tables           |
 
2407
+---------------------------+
 
2408
| columns_priv              |
 
2409
| db                        |
 
2410
| event                     |
 
2411
| func                      |
 
2412
| help_category             |
 
2413
| help_keyword              |
 
2414
| help_relation             |
 
2415
| help_topic                |
 
2416
| plugin                    |
 
2417
| proc                      |
 
2418
| procs_priv                |
 
2419
| proxies_priv              |
 
2420
| servers                   |
 
2421
| tables_priv               |
 
2422
| time_zone                 |
 
2423
| time_zone_leap_second     |
 
2424
| time_zone_name            |
 
2425
| time_zone_transition      |
 
2426
| time_zone_transition_type |
 
2427
| user                      |
 
2428
+---------------------------+
 
2429
 
 
2430
   Use the mysql program to select information from a table in
 
2431
   the mysql database:
 
2432
C:\> bin\mysql -e "SELECT User, Host FROM mysql.user" mysql
 
2433
+------+-----------+
 
2434
| User | Host      |
 
2435
+------+-----------+
 
2436
| root | localhost |
 
2437
+------+-----------+
 
2438
 
 
2439
   For more information about mysqlshow and mysql, see Section
 
2440
   4.5.6, "mysqlshow --- Display Database, Table, and Column
 
2441
   Information," and Section 4.5.1, "mysql --- The MySQL
 
2442
   Command-Line Tool."
 
2443
 
 
2444
2.3.8 Upgrading MySQL on Windows
2296
2445
 
2297
2446
   To upgrade MySQL on Windows, follow these steps:
2298
2447
 
2383
2532
   11. If you encounter errors, see Section 2.3.6,
2384
2533
       "Troubleshooting a Microsoft Windows MySQL Server
2385
2534
       Installation."
2386
 
 
2387
 
2.3.8 Windows Postinstallation Procedures
2388
 
 
2389
 
   GUI tools exist that perform most of the tasks described
2390
 
   below, including:
2391
 
 
2392
 
     * MySQL Installer: Used to install and upgrade MySQL
2393
 
       products.
2394
 
 
2395
 
     * MySQL Workbench: Manages the MySQL server and edits SQL
2396
 
       queries.
2397
 
 
2398
 
     * MySQL Notifier: Starts, stops, or restarts the MySQL
2399
 
       server, and monitors its status.
2400
 
 
2401
 
     * MySQL for Excel
2402
 
       (http://dev.mysql.com/doc/mysql-for-excel/en/index.html):
2403
 
       Edits MySQL data with Microsoft Excel.
2404
 
 
2405
 
   On Windows, you need not create the data directory and the
2406
 
   grant tables. MySQL Windows distributions include the grant
2407
 
   tables with a set of preinitialized accounts in the mysql
2408
 
   database under the data directory. Regarding passwords, if
2409
 
   you installed MySQL using the MySQL Installer, you may have
2410
 
   already assigned passwords to the accounts. (See Section
2411
 
   2.3.3, "Installing MySQL on Microsoft Windows Using MySQL
2412
 
   Installer.") Otherwise, use the password-assignment procedure
2413
 
   given in Section 2.10.2, "Securing the Initial MySQL
2414
 
   Accounts."
2415
 
 
2416
 
   Before setting up passwords, you might want to try running
2417
 
   some client programs to make sure that you can connect to the
2418
 
   server and that it is operating properly. Make sure that the
2419
 
   server is running (see Section 2.3.5.4, "Starting the Server
2420
 
   for the First Time"), and then issue the following commands
2421
 
   to verify that you can retrieve information from the server.
2422
 
   You may need to specify directory different from C:\mysql\bin
2423
 
   on the command line. If you installed MySQL using MySQL
2424
 
   Installer, the default directory is C:\Program
2425
 
   Files\MySQL\MySQL Server 5.6, and the mysql and mysqlshow
2426
 
   client programs are in C:\Program Files\MySQL\MySQL Server
2427
 
   5.6\bin. See Section 2.3.3, "Installing MySQL on Microsoft
2428
 
   Windows Using MySQL Installer," for more information.
2429
 
 
2430
 
   Use mysqlshow to see what databases exist:
2431
 
C:\> C:\mysql\bin\mysqlshow
2432
 
+--------------------+
2433
 
|     Databases      |
2434
 
+--------------------+
2435
 
| information_schema |
2436
 
| mysql              |
2437
 
| test               |
2438
 
+--------------------+
2439
 
 
2440
 
   The list of installed databases may vary, but will always
2441
 
   include the minimum of mysql and information_schema. In most
2442
 
   cases, the test database will also be installed
2443
 
   automatically.
2444
 
 
2445
 
   The preceding command (and commands for other MySQL programs
2446
 
   such as mysql) may not work if the correct MySQL account does
2447
 
   not exist. For example, the program may fail with an error,
2448
 
   or you may not be able to view all databases. If you
2449
 
   installed MySQL using MySQL Installer, then the root user
2450
 
   will have been created automatically with the password you
2451
 
   supplied. In this case, you should use the -u root and -p
2452
 
   options. (You will also need to use the -u root and -p
2453
 
   options if you have already secured the initial MySQL
2454
 
   accounts.) With -p, you will be prompted for the root
2455
 
   password. For example:
2456
 
C:\> C:\mysql\bin\mysqlshow -u root -p
2457
 
Enter password: (enter root password here)
2458
 
+--------------------+
2459
 
|     Databases      |
2460
 
+--------------------+
2461
 
| information_schema |
2462
 
| mysql              |
2463
 
| test               |
2464
 
+--------------------+
2465
 
 
2466
 
   If you specify a database name, mysqlshow displays a list of
2467
 
   the tables within the database:
2468
 
C:\> C:\mysql\bin\mysqlshow mysql
2469
 
Database: mysql
2470
 
+---------------------------+
2471
 
|          Tables           |
2472
 
+---------------------------+
2473
 
| columns_priv              |
2474
 
| db                        |
2475
 
| event                     |
2476
 
| func                      |
2477
 
| help_category             |
2478
 
| help_keyword              |
2479
 
| help_relation             |
2480
 
| help_topic                |
2481
 
| host                      |
2482
 
| plugin                    |
2483
 
| proc                      |
2484
 
| procs_priv                |
2485
 
| servers                   |
2486
 
| tables_priv               |
2487
 
| time_zone                 |
2488
 
| time_zone_leap_second     |
2489
 
| time_zone_name            |
2490
 
| time_zone_transition      |
2491
 
| time_zone_transition_type |
2492
 
| user                      |
2493
 
+---------------------------+
2494
 
 
2495
 
   Use the mysql program to select information from a table in
2496
 
   the mysql database:
2497
 
C:\> C:\mysql\bin\mysql -e "SELECT Host,Db,User FROM mysql.db"
2498
 
+------+--------+------+
2499
 
| host | db     | user |
2500
 
+------+--------+------+
2501
 
| %    | test   |      |
2502
 
| %    | test_% |      |
2503
 
+------+--------+------+
2504
 
 
2505
 
   For more information about mysqlshow and mysql, see Section
2506
 
   4.5.6, "mysqlshow --- Display Database, Table, and Column
2507
 
   Information," and Section 4.5.1, "mysql --- The MySQL
2508
 
   Command-Line Tool."
2509
 
 
2510
 
   If you are running a version of Windows that supports
2511
 
   services, you can set up the MySQL server to run
2512
 
   automatically when Windows starts. See Section 2.3.5.7,
2513
 
   "Starting MySQL as a Windows Service."