Rechercher dans le manuel MySQL

2.3.3.3 Installation Workflow with MySQL Installer

MySQL Installer provides a wizard-like tool to install and configure new MySQL products for Windows. Unlike the initial setup, which runs only once, MySQL Installer invokes the wizard each time you download or install a new product. For first-time installations, the steps of the initial setup proceed directly into the steps of the installation.

Note

Full permissions are granted to the user executing MySQL Installer to all generated files, such as my.ini. This does not apply to files and directories for specific products, such as the MySQL server data directory in %ProgramData% that is owned by SYSTEM.

Products installed and configured on a host follow a general pattern that might require your input during the various steps. MySQL Installer loads all selected products together using the following workflow:

  • Product download.  If you installed the full (not web) MySQL Installer package, all .msi files were loaded to the Product Cache folder during the initial setup and are not downloaded again. Otherwise, click Execute to begin the download. The status of each product changes from Downloading to Downloaded.

  • Product installation.  The status of each product in the list changes from Ready to Install, to Installing, and lastly to Complete. During the process, click Show Details to view the installation actions.

    If you cancel the installation at this point, the products are installed, but the server (if installed) is not yet configured. To restart the server configuration, open MySQL Installer from the Start menu and click the Reconfigure link next to the appropriate server in the dashboard.

  • Product configuration.  This step applies to MySQL Server, MySQL Router, and samples only. The status for each item in the list should indicate Ready to Configure.

    Click Next to start the configuration wizard for all items in the list. The configuration options presented during this step are specific to the version of database or router that you selected to install.

    Click Execute to begin applying the configuration options or click Back (repeatedly) to return to each configuration page. Click Finish to open the MySQL Installer dashboard.

  • Installation complete.  This step finalizes the installation for products that do not require configuration. It enables you to copy the log to a clipboard and to start certain applications, such as MySQL Workbench and MySQL Shell. Click Finish to open the MySQL Installer dashboard.

2.3.3.3.1 MySQL Server Configuration with MySQL Installer

MySQL Installer performs the initial configuration of the MySQL server. For example:

  • For the MySQL 8.0 release series, a server can be configured to run as a standalone database, as a sandbox InnoDB cluster on a single host, or to create a production InnoDB cluster inside a local network (see Section 2.3.3.3.1.1, “High Availability”).

  • It creates the configuration file (my.ini) that is used to configure the MySQL server. The values written to this file are influenced by choices you make during the installation process. Some definitions are host dependent. For example, query_cache is enabled if the host has fewer than three cores.

    Note

    Query cache was deprecated in MySQL 5.7 and removed in MySQL 8.0 (and later).

  • By default, a Windows service for the MySQL server is added.

  • Provides default installation and data paths for MySQL server. For instructions on how to change the default paths, see Section 2.3.3.2, “Setting Alternative Server Paths with MySQL Installer”.

  • It can optionally create MySQL server user accounts with configurable permissions based on general roles, such as DB Administrator, DB Designer, and Backup Admin. It optionally creates a Windows user named MysqlSys with limited privileges, which would then run the MySQL Server.

    User accounts may also be added and configured in MySQL Workbench.

  • Checking Show Advanced Options enables additional Logging Options to be set. This includes defining custom file paths for the error log, general log, slow query log (including the configuration of seconds it requires to execute a query), and the binary log.

During the configuration process, click Next to proceed to the next step or Back to return to the previous step. Click Execute at the final step to apply the server configuration.

The sections that follow describe the server configuration options that apply to MySQL server on Windows. The server version you installed will determine which steps and options you can configure. Configuring MySQL server may include some or all of the steps.

Inhaltsverzeichnis Haut

2.3.3.3.1.1 High Availability

MySQL Installer enables you to install, configure, and deploy MySQL Server as a standalone instance or as a member of a highly available cluster using MySQL Group Replication. In either case, MySQL Installer restricts the installation and configuration of the server (or servers) to the local Windows host computer.

  • Standalone MySQL Server / Classic MySQL Replication (default)

    Select this option to configure one MySQL instance to run as a standalone database server. This option is ideal if you intend to set up classic replication later and then to include this server in your custom solution. The remaining configuration steps are described in the sections that follow, starting with Type and Networking.

  • InnoDB cluster

    Select this option to create or extend an InnoDB cluster solution that is based on MySQL Group Replication (see Section 21.1, “Introducing InnoDB Cluster”). You can configure (or reconfigure) a minimum of three server instances to perform a basic setup as a test-only sandbox cluster on a single computer or to create a production cluster inside a local network.

    InnoDB Cluster Log Verbosity Level.  This configuration step includes an adjustable log that captures information during the configuration of each server instance in the production or sandbox cluster. The values are: MINIMAL, MEDIUM (default), and DEBUG. If the cluster configuration fails, use the Reconfigure action from the MySQL Installer dashboard to restart the configuration and then set the verbosity level to DEBUG to gather additional information during your next attempt.

    MySQL Installer provides the following configuration variations to deploy an InnoDB cluster:

    • Set Up a Local Server Cluster for Testing Only

      Select Create a Sandbox InnoDB cluster for Testing to enable this option. When prompted, define the number of server sandbox instances in the cluster, set a password for the root user, and adjust the InnoDB cluster log verbosity level as needed. For a more detailed description of the configuration, see Deploying a Sandbox InnoDB Cluster with MySQL Installer. This setup requires MySQL 5.7.17 or higher.

    • Create or Join an InnoDB cluster

      To set up a highly available InnoDB cluster using MySQL Installer, you must have a minimum of three computers on a local network. If you require a more advanced setup, use MySQL Shell to configure some or all of the server instances in the cluster. For details about how to perform a local-network cluster setup, see Setting up an InnoDB cluster with MySQL Installer. This setup requires MySQL 8.0.0 or higher.

    InnoDB cluster was designed to operate with MySQL Shell, which enables you to perform advanced cluster administration, and MySQL Router to automate the connections made between client applications and server instances. Neither MySQL Shell nor MySQL Router are required to deploy a cluster on Windows using MySQL Installer.

Inhaltsverzeichnis Haut

Deploying a Sandbox InnoDB Cluster with MySQL Installer

A sandbox deployment includes multiple server sandbox instances that run together on the same computer. Because all server instances reside on the same computer, a sandbox cluster does not meet the requirements of a highly available solution. Instead, this deployment option simulates an environment from which you can explore the techniques associated with InnoDB cluster administration.

When you select Create a Sandbox InnoDB cluster for Testing, a follow-on step prompts you to select a cluster consisting of three, five, seven, or nine MySQL server instances. Unlike the other server setups provided by MySQL Installer, the sandbox deployment skips the usual server configuration steps (except Authentication Method). The resulting cluster, named sandboxCluster, is available on selected ports that are configured for you.

Note

MySQL Installer deletes ports 3310 to 3390 during the configuration, if those ports were set for the sandbox InnoDB cluster manually using MySQL Shell.

Each sandbox instance is configured to run as a process (not a Windows service). You must start each instance in the sandbox cluster manually after restarting the computer.

After you create the test cluster, click the Summary tab to view the specific ports that apply to your cluster. To modify the number of server instances within the existing cluster or to adjust the logging level, use the Reconfigure quick action from the MySQL Installer dashboard.

Warning

MySQL Installer deletes all existing sandbox cluster data when the cluster is reconfigured or when the server instances within the sandbox cluster are upgraded.

MySQL Installer stores all sandbox InnoDB cluster configuration entries in the installer_config.xml file. By default, MySQL Installer creates the sandbox instances in %userprofile%\MySQL\mysql-sandboxes on the local host.

Inhaltsverzeichnis Haut

Setting up InnoDB Cluster with MySQL Installer

To create a single InnoDB cluster, select InnoDB Cluster as the High Availability option and then select Create a New InnoDB Cluster. Adjust the log verbosity level (as needed), and click Next to configure the first server instance. This setup process involves installing and running MySQL Installer on multiple computers.

Define the first server instance (or seed) by providing the following configuration information:

  • InnoDB Cluster Name:

    The default cluster name is myCluster. If you intend to configure multiple clusters, replace the default name with one that is meaningful within your solution. Alphanumeric characters, spaces, and underscore (_) characters are valid for this field. The limit is 40 characters.

  • Cluster Admin User Name:

    The default cluster administrator name is ic. You can reuse the same MySQL administrative account across multiple clusters. You will be prompted for this account name (and password) later when you configure other server instances to join the cluster. The limit is 32 characters.

  • Cluster Admin Password:

    Enter a password for the cluster administrator account (minimum length is four characters). MySQL Installer will evaluate the strength of the MySQL password as you type. Use the Repeat Password field to confirm the password.

  • Host Address:

    Select the host name or IP address of the local host from the list. When joining additional server instances to the cluster, you will be prompted to identify the seed instance by the host name or IP address.

  • Server ID:

    The default value is 1. This identifier is required to record the events of a server instance in the binary log. The ID of each server instance within a cluster must be unique; however, you can reuse the same number in a different cluster. The server ID you specify in this field also appears later in Advanced Options step. If you change the value in Advanced Option, the number is changed for the InnoDB cluster Setup too.

Click Next and then complete the remaining configuration steps, which are described in the sections that follow, starting with Type and Networking. After the seed instance is added and the cluster is created, it requires more instances for full tolerance. At this point, the status is OK_NO_TOLERANCE.

To add the second and third server instances to the cluster, you must use a separate computer inside the local network for each. Some of the configuration details of the seed instance are required to complete the join operation.

After you start MySQL Installer and install the server instance on the next computer, begin the configuration by selecting InnoDB Cluster as the High Availability option and then select Add Local MySQL Server Instance to an InnoDB Cluster. Adjust the InnoDB Cluster Log Verbosity Level (as needed) and then click Next.

Define the joining server instance by providing the following configuration information:

  • Seed Instance Address:

    Enter the host name or IP address of the computer that hosts the seed instance.

  • Seed Instance Port:

    The default value is 3306, which is the port for classic MySQL. Use the same TCP port that you configured for the seed instance.

  • Cluster Admin User Name:

    The default cluster administrator name is ic. If you assigned a different name when you configured the seed instance, enter the alternative cluster administrator name.

  • Cluster Admin Password:

    Enter the password assigned to the cluster administrator account.

  • Host Address:

    Select the host name or IP address of the local host from the list.

  • Server ID:

    The default value is 1. This identifier is required to record the events of a server instance in the binary log. The ID of each server instance within a cluster must be unique; however, you can reuse the same number in a different cluster. The server ID you specify in this field also appears later in Advanced Options step. If you change the value in Advanced Option, the number is changed for the InnoDB cluster Setup too.

  • Test Connection

    Use this button to verify the connection between the local server instance and the seed instance defined for the cluster. A valid connection is required to proceed.

Click Next and then complete the remaining configuration steps, which are described in the sections that follow, starting with Type and Networking.

With one seed instance and a second server instance in the cluster, the status is OK_NO_TOLERANCE. After you add the third server instance, the status is OK, which indicates that the cluster now is tolerant to the failure of one instance.

Inhaltsverzeichnis Haut

2.3.3.3.1.2 Type and Networking
  • Server Configuration Type

    Choose the MySQL server configuration type that describes your setup. This setting defines the amount of system resources (memory) that will be assigned to your MySQL server instance.

    • Development: A machine that will host many other applications, and typically this is your personal workstation. This option configures MySQL to use the least amount of memory.

    • Server: Several other applications will be running on this machine, such as a web server. This option configures MySQL to use a medium amount of memory.

    • Dedicated: A machine that is dedicated to running the MySQL server. Because no other major applications will run on this server, such as a web server, this option configures MySQL to use the majority of available memory.

  • Connectivity

    Connectivity options control how the connection to MySQL is made. Options include:

    • TCP/IP: You may enable TCP/IP Networking here as otherwise only local host connections are permitted. Also define the Port (for the classic MySQL protocol), X Protocol Port (for MySQL as a document store), and whether to open the firewall port for network access. If the port number is in use already, you will see the information icon () next to the default value and Next is disabled until you provide a new port number.

    • Named Pipe: Enable and define the pipe name, similar to setting the named_pipe system variable. The default name is MySQL.

    • Shared Memory: Enable and then define the memory name, similar to setting the shared_memory system variable. The default name is MySQL.

  • Advanced Configuration

    Check Show Advanced and Logging Options to set custom logging and advanced options in later steps. The Logging Options step enables you to define custom file paths for the error log, general log, slow query log (including the configuration of seconds it requires to execute a query), and the binary log. The Advanced Options step enables you to set the unique server ID required when binary logging is enabled in a replication topology.

  • MySQL Enterprise Firewall (Enterprise Edition only)

    The Enable Enterprise Firewall check box is selected by default. For post-installation instructions, see Section 6.4.7, “MySQL Enterprise Firewall”.

Inhaltsverzeichnis Haut

2.3.3.3.1.3 Authentication Method

The Authentication Method step is visible only during the installation or upgrade of MySQL 8.0.4 or higher. It introduces a choice between two server-side authentication options. The MySQL user accounts that you create in the next step will use the authentication method that you select in this step.

MySQL 8.0 connectors and community drivers that use libmysqlclient 8.0 now support the mysql_native_password default authentication plugin. However, if you are unable to update your clients and applications to support this new authentication method, you can configure the MySQL server to use mysql_native_password for legacy authentication. For more information about the implications of this change, see caching_sha2_password as the Preferred Authentication Plugin.

If you are installing or upgrading to MySQL 8.0.4 or higher, select one of the following authentication methods:

  • Use Strong Password Encryption for Authentication (RECOMMENDED)

    MySQL 8.0 supports a new authentication based on improved, stronger SHA256-based password methods. It is recommended that all new MySQL server installations use this method going forward.

    Important

    The caching_sha2_password authentication plugin on the server requires new versions of connectors and clients, which add support for the new MySQL 8.0 default authentication.

  • Use Legacy Authentication Method (Retain MySQL 5.x Compatibility)

    Using the old MySQL 5.x legacy authentication method should be considered only in the following cases:

    • Applications cannot be updated to use MySQL 8.0 connectors and drivers.

    • Recompilation of an existing application is not feasible.

    • An updated, language-specific connector or driver is not available yet.

Inhaltsverzeichnis Haut

2.3.3.3.1.4 Accounts and Roles
  • Root Account Password

    Assigning a root password is required and you will be asked for it when performing other MySQL Installer operations. Password strength is evaluated when you repeat the password in the box provided. For descriptive information regarding password requirements or status, move your mouse pointer over the information icon () when it appears.

  • MySQL User Accounts (Optional)

    Click Add User or Edit User to create or modify MySQL user accounts with predefined roles. Next, enter the required account credentials:

    • User Name: MySQL user names can be up to 32 characters long.

    • Host: Select localhost for local connections only or <All Hosts (%)> when remote connections to the server are required.

    • Role: Each predefined role, such as DB Admin, is configured with its own set of privileges. For example, the DB Admin role has more privileges than the DB Designer role. The Role drop-down list contains a description of each role.

    • Password: Password strength assessment is performed while you type the password. Passwords must be confirmed. MySQL permits a blank or empty password (considered to be insecure).

    MySQL Installer Commercial Release Only:  MySQL Enterprise Edition for Windows, a commercial product, also supports an authentication method that performs external authentication on Windows. Accounts authenticated by the Windows operating system can access the MySQL server without providing an additional password.

    To create a new MySQL account that uses Windows authentication, enter the user name and then select a value for Host and Role. Click Windows authentication to enable the authentication_windows plugin. In the Windows Security Tokens area, enter a token for each Windows user (or group) who can authenticate with the MySQL user name. MySQL accounts can include security tokens for both local Windows users and Windows users that belong to a domain. Multiple security tokens are separated by the semicolon character (;) and use the following format for local and domain accounts:

    • Local account

      Enter the simple Windows user name as the security token for each local user or group; for example, finley;jeffrey;admin.

    • Domain account

      Use standard Windows syntax (domain\domainuser) or MySQL syntax (domain\\domainuser) to enter Windows domain users and groups.

      For domain accounts, you may need to use the credentials of an administrator within the domain if the account running MySQL Installer lacks the permissions to query the Active Directory. If this is the case, select Validate Active Directory users with to activate the domain administrator credentials.

    Windows authentication permits you to test all of the security tokens each time you add or modify a token. Click Test Security Tokens to validate (or revalidate) each token. Invalid tokens generate a descriptive error message along with a red X icon and red token text. When all tokens resolve as valid (green text without an X icon), you can click OK to save the changes.

Inhaltsverzeichnis Haut

2.3.3.3.1.5 Windows Service

On the Windows platform, MySQL server can run as a named service managed by the operating system and be configured to start up automatically when Windows starts. Alternatively, you can configure MySQL server to run as an executable program that requires manual configuration.

  • Configure MySQL server as a Windows service (Selected by default.)

    When the default configuration option is selected, you can also select the following:

    • Start the MySQL Server at System Startup

      When selected (default), the service startup type is set to Automatic; otherwise, the startup type is set to Manual.

    • Run Windows Service as

      When Standard System Account is selected (default), the service logs on as Network Service.

      The Custom User option must have privileges to log on to Microsoft Windows as a service. The Next button will be disabled until this user is configured with the required privileges.

      A custom user account is configured in Windows by searching for "local security policy" in the Start menu. In the Local Security Policy window, select Local Policies, User Rights Assignment, and then Log On As A Service to open the property dialog. Click Add User or Group to add the custom user and then click OK in each dialog to save the changes.

  • Deselect the Windows Service option

Inhaltsverzeichnis Haut

2.3.3.3.1.6 Logging Options

This step is available if the Show Advanced Configuration check box was selected during the Type and Networking step. To enable this step now, click Back to return to the Type and Networking step and select the check box.

Advanced configuration options are related to the following MySQL log files:

Note

The binary log is enabled by default for MySQL 5.7 and higher.

Inhaltsverzeichnis Haut

2.3.3.3.1.7 Advanced Options

This step is available if the Show Advanced Configuration check box was selected during the Type and Networking step. To enable this step now, click Back to return to the Type and Networking step and select the check box.

The advanced-configuration options include:

  • Server ID

    Set the unique identifier used in a replication topology. If binary logging is enabled, you must specify a server ID. The default ID value depends on the server version. For more information, see the description of the --server-id option.

    Tip

    If you specified an ID for a server instance of an InnoDB cluster, then MySQL Installer adjusts the ID (shown on this page) to match the previous identifier.

  • Table Names Case

    You can set the following options during the initial and subsequent configuration the server. For the MySQL 8.0 release series, these options apply only to the initial configuration of the server.

    • Lower Case

      Sets the lower_case_table_names option value to 1 (default), in which table names are stored in lowercase on disk and comparisons are not case sensitive.

    • Preserve Given Case

      Sets the lower_case_table_names option value to 2, in which table names are stored as given but compared in lowercase.

Inhaltsverzeichnis Haut

2.3.3.3.1.8 Apply Server Configuration

All configuration settings are applied to the MySQL server when you click Execute. Use the Configuration Steps tab to follow the progress of each action; the icon for each toggles from white to green (with a check mark) on success. Otherwise, the process stops and displays an error message if an individual action times out. Click the Log tab to view the log.

When the installation completes successfully and you click Finish, MySQL Installer and the installed MySQL products are added to the Microsoft Windows Start menu under the MySQL group. Opening MySQL Installer loads the dashboard where installed MySQL products are listed and other MySQL Installer operations are available.

Inhaltsverzeichnis Haut

2.3.3.3.2 MySQL Router Configuration with MySQL Installer

MySQL Installer downloads and installs a suite of tools for developing and managing business-critical applications on Windows. The suite consist of applications, connectors, documentation, and samples.

During the initial setup, choose any predetermined setup type, except Server only, to install the latest GA version of the tools. Use the Custom setup type to install an individual tool or specific version. If MySQL Installer is installed on the host already, use the Add operation to select and install tools from the MySQL Installer dashboard.

Inhaltsverzeichnis Haut

MySQL Router Configuration

MySQL Installer provides a configuration wizard that can bootstrap an installed instance of MySQL Router 8.0 or later to route traffic between MySQL applications and an InnoDB cluster. When configured, MySQL Router runs as a local Windows service. For detailed information about using MySQL Router with an InnoDB cluster, see Routing for MySQL InnoDB cluster.

Note

You are prompted to configure MySQL Router after the initial installation and when you reconfigure an installed router explicitly. In contrast, the upgrade operation does not require or prompt you to configure the upgraded product.

To configure MySQL Router, do the following:

  1. Set up InnoDB cluster. For instructions on how to configure a sandbox InnoDB cluster on the local host using MySQL Installer, see Section 2.3.3.3.1.1, “High Availability”.

    For general InnoDB cluster information, see Chapter 21, InnoDB Cluster.

  2. Using MySQL Installer, download and install the MySQL Router application. After the installation finishes, the configuration wizard prompts you for information. Select the Configure MySQL Router for InnoDB cluster check box to begin the configuration and provide the following configuration values:

    • Hostname: Host name of the primary (seed) server in the InnoDB cluster (localhost by default).

    • Port: The port number of the primary (seed) server in the InnoDB cluster (3310 by default).

    • Management User: An administrative user with root-level privileges.

    • Password: The password for the management user.

    • Classic MySQL protocol connections to InnoDB cluster

      Read/Write: Set the first base port number to one that is unused (between 80 and 65532) and the wizard will select the remaining ports for you.

      The figure that follows shows an example of the MySQL Router configuration page, with the first base port number specified as 6446 and the remaining ports set by the wizard as 6447, 6448, and 6449.

    Figure 2.10 MySQL Router Configuration

    Content is described in the surrounding text.

  3. Click Next and then Execute to apply the configuration. Click Finish to close MySQL Installer or return to the MySQL Installer dashboard.

After installing a production cluster with MySQL Router, the root account only exists in the user table as root@localhost (local), instead of root@% (remote). Regardless of where the router or client are located, even if both are located on the same host as the seed server, any connection that passes through the router is viewed by server as being remote, not local. As a result, a connection made to the server using the local host (see the example that follows), does not authenticate.

shell> \c root@localhost:6446

Suchen Sie im MySQL-Handbuch

Deutsche Übersetzung

Sie haben gebeten, diese Seite auf Deutsch zu besuchen. Momentan ist nur die Oberfläche übersetzt, aber noch nicht der gesamte Inhalt.

Wenn Sie mir bei Übersetzungen helfen wollen, ist Ihr Beitrag willkommen. Alles, was Sie tun müssen, ist, sich auf der Website zu registrieren und mir eine Nachricht zu schicken, in der Sie gebeten werden, Sie der Gruppe der Übersetzer hinzuzufügen, die Ihnen die Möglichkeit gibt, die gewünschten Seiten zu übersetzen. Ein Link am Ende jeder übersetzten Seite zeigt an, dass Sie der Übersetzer sind und einen Link zu Ihrem Profil haben.

Vielen Dank im Voraus.

Dokument erstellt 26/06/2006, zuletzt geändert 26/10/2018
Quelle des gedruckten Dokuments:https://www.gaudry.be/de/mysql-rf-mysql-installer-workflow.html

Die Infobro ist eine persönliche Seite, deren Inhalt in meiner alleinigen Verantwortung liegt. Der Text ist unter der CreativeCommons-Lizenz (BY-NC-SA) verfügbar. Weitere Informationen auf die Nutzungsbedingungen und dem Autor.

Referenzen

  1. Zeigen Sie - html-Dokument Sprache des Dokuments:en Manuel MySQL : https://dev.mysql.com/

Diese Verweise und Links verweisen auf Dokumente, die während des Schreibens dieser Seite konsultiert wurden, oder die zusätzliche Informationen liefern können, aber die Autoren dieser Quellen können nicht für den Inhalt dieser Seite verantwortlich gemacht werden.
Der Autor Diese Website ist allein dafür verantwortlich, wie die verschiedenen Konzepte und Freiheiten, die mit den Nachschlagewerken gemacht werden, hier dargestellt werden. Denken Sie daran, dass Sie mehrere Quellinformationen austauschen müssen, um das Risiko von Fehlern zu reduzieren.

Inhaltsverzeichnis Haut