Mysql how to install mysql
Mysql how to install mysql
Chapter 5 Installing MySQL on Microsoft Windows
Table of Contents
MySQL 8.0 Server requires the Microsoft Visual C++ 2019 Redistributable Package to run on Windows platforms. Users should make sure the package has been installed on the system before installing the server. The package is available at the Microsoft Download Center. Additionally, MySQL debug binaries require Visual Studio 2019 to be installed.
MySQL is available for Microsoft Windows 64-bit operating systems only. For supported Windows platform information, see https://www.mysql.com/support/supportedplatforms/database.html.
There are different methods to install MySQL on Microsoft Windows.
MySQL Installer Method
The simplest and recommended method is to download MySQL Installer (for Windows) and let it install and configure a specific version of MySQL Server as follows:
Download MySQL Installer from https://dev.mysql.com/downloads/installer/ and execute it.
Unlike the standard MySQL Installer, the smaller web-community version does not bundle any MySQL applications, but downloads only the MySQL products you choose to install.
Determine the setup type to use for the initial installation of MySQL products. For example:
Developer Default : Provides a setup type that includes the selected version of MySQL Server and other MySQL tools related to MySQL development, such as MySQL Workbench.
Server Only : Provides a setup for the selected version of MySQL Server without other products.
Custom : Enables you to select any version of MySQL Server and other MySQL products.
Install the server instance (and products) and then begin the server configuration by following the onscreen instructions. For more information about each individual step, see Section 5.3.3.1, “MySQL Server Configuration with MySQL Installer”.
MySQL is now installed. If you configured MySQL as a service, then Windows automatically starts the MySQL server every time you restart the system. Also, this process installs the MySQL Installer application on the local host, which you can use later to upgrade or reconfigure MySQL server.
If you installed MySQL Workbench on your system, consider using it to check your new MySQL server connection. By default, the program automatically start after installing MySQL.
Additional Installation Information
It is possible to run MySQL as a standard application or as a Windows service. By using a service, you can monitor and control the operation of the server through the standard Windows service management tools. For more information, see Section 5.4.8, “Starting MySQL as a Windows Service”.
For a list of limitations on the use of MySQL on the Windows platform, see Section 5.7, “Windows Platform Restrictions”.
In addition to the MySQL Server package, you may need or want additional components to use MySQL with your application or development environment. These include, but are not limited to:
To connect to the MySQL server using ODBC, you must have a Connector/ODBC driver. For more information, including installation and configuration instructions, see MySQL Connector/ODBC Developer Guide.
MySQL Installer installs and configures Connector/ODBC for you.
MySQL Installer installs and configures MySQL Connector/NET for you.
MySQL distributions for Windows can be downloaded from https://dev.mysql.com/downloads/. See Section 2.3, “How to Get MySQL”.
MySQL for Windows is available in several distribution formats, detailed here. Generally speaking, you should use MySQL Installer. It contains more features and MySQL products than the older MSI, is simpler to use than the compressed file, and you need no additional tools to get MySQL up and running. MySQL Installer automatically installs MySQL Server and additional MySQL products, creates an options file, starts the server, and enables you to create default user accounts. For more information on choosing a package, see Section 5.2, “Choosing an Installation Package”.
A MySQL Installer distribution includes MySQL Server and additional MySQL products including MySQL Workbench, and MySQL for Visual Studio. MySQL Installer can also be used to upgrade these products in the future (see https://dev.mysql.com/doc/mysql-compat-matrix/en/).
For instructions on installing MySQL using MySQL Installer, see Section 5.3, “MySQL Installer for Windows”.
The standard binary distribution (packaged as a compressed file) contains all of the necessary files that you unpack into your chosen location. This package contains all of the files in the full Windows MSI Installer package, but does not include an installation program.
The source distribution format contains all the code and support files for building the executables using the Visual Studio compiler system.
For instructions on building MySQL from source on Windows, see Chapter 4, Installing MySQL from Source.
MySQL on Windows Considerations
Large Table Support
If you need tables with a size larger than 4GB, install MySQL on an NTFS or newer file system. Do not forget to use MAX_ROWS and AVG_ROW_LENGTH when you create tables. See CREATE TABLE Statement.
MySQL and Virus Checking Software
Virus-scanning software such as Norton/Symantec Anti-Virus on directories containing MySQL data and temporary tables can cause issues, both in terms of the performance of MySQL and the virus-scanning software misidentifying the contents of the files as containing spam. This is due to the fingerprinting mechanism used by the virus-scanning software, and the way in which MySQL rapidly updates different files, which may be identified as a potential security risk.
After installing MySQL Server, it is recommended that you disable virus scanning on the main directory ( datadir ) used to store your MySQL table data. There is usually a system built into the virus-scanning software to enable specific directories to be ignored.
Chapter 5 Installing MySQL on Microsoft Windows
Table of Contents
MySQL Community 5.6 Server requires the Microsoft Visual C++ 2010 Redistributable Package to run on Windows platforms. Users should make sure the package has been installed on the system before installing the server. The package is available at the Microsoft Download Center.
MySQL is available for Microsoft Windows, for both 32-bit and 64-bit versions. For supported Windows platform information, see https://www.mysql.com/support/supportedplatforms/database.html.
There are different methods to install MySQL on Microsoft Windows.
MySQL Installer Method
The simplest and recommended method is to download MySQL Installer (for Windows) and let it install and configure all of the MySQL products on your system. Here is how:
Download MySQL Installer from https://dev.mysql.com/downloads/installer/ and execute it.
Unlike the standard MySQL Installer, the smaller «web-community» version does not bundle any MySQL applications but rather downloads the MySQL products you choose to install.
Choose the appropriate Setup Type for your system. Typically you should choose Developer Default to install the MySQL server and other MySQL tools related to MySQL development, and helpful tools like MySQL Workbench. Or, choose the Custom setup type to select the desired MySQL products manually.
Multiple versions of MySQL server can exist on a single system. You can choose one or multiple versions.
Complete the installation process by following the instructions. This installs several MySQL products and starts the MySQL server.
MySQL is now installed. If you configured MySQL as a service, then Windows automatically starts the MySQL server every time you restart your system.
You probably also installed other helpful MySQL products like MySQL Workbench on your system. Consider loading MySQL Workbench to check your new MySQL server connection. By default, this program automatically start after installing MySQL.
This process also installs the MySQL Installer application on your system, and later you can use MySQL Installer to upgrade or reconfigure your MySQL products.
Additional Installation Information
It is possible to run MySQL as a standard application or as a Windows service. By using a service, you can monitor and control the operation of the server through the standard Windows service management tools. For more information, see Section 5.4.7, “Starting MySQL as a Windows Service”.
For a list of limitations on the use of MySQL on the Windows platform, see Section 5.7, “Windows Platform Restrictions”.
In addition to the MySQL Server package, you may need or want additional components to use MySQL with your application or development environment. These include, but are not limited to:
To connect to the MySQL server using ODBC, you must have a Connector/ODBC driver. For more information, including installation and configuration instructions, see MySQL Connector/ODBC Developer Guide.
MySQL Installer installs and configures Connector/ODBC for you.
MySQL Installer installs and configures MySQL Connector/NET for you.
MySQL distributions for Windows can be downloaded from https://dev.mysql.com/downloads/. See Section 2.3, “How to Get MySQL”.
MySQL for Windows is available in several distribution formats, detailed here. Generally speaking, you should use MySQL Installer. It contains more features and MySQL products than the older MSI, is simpler to use than the compressed file, and you need no additional tools to get MySQL up and running. MySQL Installer automatically installs MySQL Server and additional MySQL products, creates an options file, starts the server, and enables you to create default user accounts. For more information on choosing a package, see Section 5.2, “Choosing an Installation Package”.
A MySQL Installer distribution includes MySQL Server and additional MySQL products, including MySQL Workbench. MySQL Installer can also be used to upgrade this product in the future.
For instructions on installing MySQL using MySQL Installer, see Section 5.3, “MySQL Installer for Windows”.
The standard binary distribution (packaged as a compressed file) contains all of the necessary files that you unpack into your chosen location. This package contains all of the files in the full Windows MSI Installer package, but does not include an installation program.
The source distribution format contains all the code and support files for building the executables using the Visual Studio compiler system.
For instructions on building MySQL from source on Windows, see Chapter 4, Installing MySQL from Source.
MySQL on Windows Considerations
Large Table Support
If you need tables with a size larger than 4 GB, install MySQL on an NTFS or newer file system. Do not forget to use MAX_ROWS and AVG_ROW_LENGTH when you create tables. See CREATE TABLE Statement.
InnoDB tablespace files cannot exceed 4 GB on Windows 32-bit systems.
MySQL and Virus Checking Software
Virus-scanning software such as Norton/Symantec Anti-Virus on directories containing MySQL data and temporary tables can cause issues, both in terms of the performance of MySQL and the virus-scanning software misidentifying the contents of the files as containing spam. This is due to the fingerprinting mechanism used by the virus-scanning software, and the way in which MySQL rapidly updates different files, which may be identified as a potential security risk.
After installing MySQL Server, it is recommended that you disable virus scanning on the main directory ( datadir ) used to store your MySQL table data. There is usually a system built into the virus-scanning software to enable specific directories to be ignored.
In addition, by default, MySQL creates temporary files in the standard Windows temporary directory. To prevent the temporary files also being scanned, configure a separate temporary directory for MySQL temporary files and add this directory to the virus scanning exclusion list. To do this, add a configuration option for the tmpdir parameter to your my.ini configuration file. For more information, see Section 5.4.2, “Creating an Option File”.
Running MySQL on a 4K Sector Hard Drive
Chapter 1 Installing and Upgrading MySQL
This chapter describes how to obtain and install MySQL. A summary of the procedure follows and later sections provide the details. If you plan to upgrade an existing version of MySQL to a newer version rather than install MySQL for the first time, see Chapter 10, Upgrading MySQL, for information about upgrade procedures and about issues that you should consider before upgrading.
If you are interested in migrating to MySQL from another database system, see MySQL 5.7 FAQ: Migration, which contains answers to some common questions concerning migration issues.
Installation of MySQL generally follows the steps outlined here:
Determine whether MySQL runs and is supported on your platform.
Please note that not all platforms are equally suitable for running MySQL, and that not all platforms on which MySQL is known to run are officially supported by Oracle Corporation. For information about those platforms that are officially supported, see https://www.mysql.com/support/supportedplatforms/database.html on the MySQL website.
Choose which distribution to install.
Several versions of MySQL are available, and most are available in several distribution formats. You can choose from pre-packaged distributions containing binary (precompiled) programs or source code. When in doubt, use a binary distribution. Oracle also provides access to the MySQL source code for those who want to see recent developments and test new code. To determine which version and type of distribution you should use, see Section 2.2, “Which MySQL Version and Distribution to Install”.
Download the distribution that you want to install.
For instructions, see Section 2.3, “How to Get MySQL”. To verify the integrity of the distribution, use the instructions in Section 2.4, “Verifying Package Integrity Using MD5 Checksums or GnuPG”.
Install the distribution.
To install MySQL from a binary distribution, use the instructions in Chapter 3, Installing MySQL on Unix/Linux Using Generic Binaries. Alternatively, use the Secure Deployment Guide, which provides procedures for deploying a generic binary distribution of MySQL Enterprise Edition Server with features for managing the security of your MySQL installation.
To install MySQL from a source distribution or from the current development source tree, use the instructions in Chapter 4, Installing MySQL from Source.
Perform any necessary postinstallation setup.
After installing MySQL, see Chapter 9, Postinstallation Setup and Testing for information about making sure the MySQL server is working properly. Also refer to the information provided in Section 9.4, “Securing the Initial MySQL Account”. This section describes how to secure the initial MySQL root user account, which has no password until you assign one. The section applies whether you install MySQL using a binary or source distribution.
If you want to run the MySQL benchmark scripts, Perl support for MySQL must be available. See Chapter 13, Perl Installation Notes.
Instructions for installing MySQL on different platforms and environments is available on a platform by platform basis:
Unix, Linux, FreeBSD
For information on building MySQL entirely from the source code distributions or the source code repositories, see Chapter 4, Installing MySQL from Source
For specific platform help on installation, configuration, and building from source see the corresponding platform section:
Linux, including notes on distribution specific methods, see Chapter 7, Installing MySQL on Linux.
Microsoft Windows
For instructions on installing MySQL on Microsoft Windows, using either the MySQL Installer or Zipped binary, see Chapter 5, Installing MySQL on Microsoft Windows.
For details and instructions on building MySQL from source code using Microsoft Visual Studio, see Chapter 4, Installing MySQL from Source.
macOS
For installation on macOS, including using both the binary package and native PKG formats, see Chapter 6, Installing MySQL on macOS.
For information on making use of an macOS Launch Daemon to automatically start and stop MySQL, see Section 6.3, “Installing a MySQL Launch Daemon”.
Chapter 1 Installing and Upgrading MySQL
This chapter describes how to obtain and install MySQL. A summary of the procedure follows and later sections provide the details. If you plan to upgrade an existing version of MySQL to a newer version rather than install MySQL for the first time, see Chapter 10, Upgrading MySQL, for information about upgrade procedures and about issues that you should consider before upgrading.
If you are interested in migrating to MySQL from another database system, see MySQL 8.0 FAQ: Migration, which contains answers to some common questions concerning migration issues.
Installation of MySQL generally follows the steps outlined here:
Determine whether MySQL runs and is supported on your platform.
Please note that not all platforms are equally suitable for running MySQL, and that not all platforms on which MySQL is known to run are officially supported by Oracle Corporation. For information about those platforms that are officially supported, see https://www.mysql.com/support/supportedplatforms/database.html on the MySQL website.
Choose which distribution to install.
Several versions of MySQL are available, and most are available in several distribution formats. You can choose from pre-packaged distributions containing binary (precompiled) programs or source code. When in doubt, use a binary distribution. Oracle also provides access to the MySQL source code for those who want to see recent developments and test new code. To determine which version and type of distribution you should use, see Section 2.2, “Which MySQL Version and Distribution to Install”.
Download the distribution that you want to install.
For instructions, see Section 2.3, “How to Get MySQL”. To verify the integrity of the distribution, use the instructions in Section 2.4, “Verifying Package Integrity Using MD5 Checksums or GnuPG”.
Install the distribution.
To install MySQL from a binary distribution, use the instructions in Chapter 3, Installing MySQL on Unix/Linux Using Generic Binaries. Alternatively, use the Secure Deployment Guide, which provides procedures for deploying a generic binary distribution of MySQL Enterprise Edition Server with features for managing the security of your MySQL installation.
To install MySQL from a source distribution or from the current development source tree, use the instructions in Chapter 4, Installing MySQL from Source.
Perform any necessary postinstallation setup.
After installing MySQL, see Chapter 9, Postinstallation Setup and Testing for information about making sure the MySQL server is working properly. Also refer to the information provided in Section 9.4, “Securing the Initial MySQL Account”. This section describes how to secure the initial MySQL root user account, which has no password until you assign one. The section applies whether you install MySQL using a binary or source distribution.
If you want to run the MySQL benchmark scripts, Perl support for MySQL must be available. See Chapter 13, Perl Installation Notes.
Instructions for installing MySQL on different platforms and environments is available on a platform by platform basis:
Unix, Linux, FreeBSD
For information on building MySQL entirely from the source code distributions or the source code repositories, see Chapter 4, Installing MySQL from Source
For specific platform help on installation, configuration, and building from source see the corresponding platform section:
Linux, including notes on distribution specific methods, see Chapter 7, Installing MySQL on Linux.
Microsoft Windows
For instructions on installing MySQL on Microsoft Windows, using either the MySQL Installer or Zipped binary, see Chapter 5, Installing MySQL on Microsoft Windows.
For details and instructions on building MySQL from source code using Microsoft Visual Studio, see Chapter 4, Installing MySQL from Source.
macOS
For installation on macOS, including using both the binary package and native PKG formats, see Chapter 6, Installing MySQL on macOS.
For information on making use of an macOS Launch Daemon to automatically start and stop MySQL, see Section 6.3, “Installing and Using the MySQL Launch Daemon”.
Mysql how to install mysql
MySQL 8.0 Server requires the Microsoft Visual C++ 2019 Redistributable Package to run on Windows platforms. Users should make sure the package has been installed on the system before installing the server. The package is available at the Microsoft Download Center. Additionally, MySQL debug binaries require Visual Studio 2019 to be installed.
MySQL is available for Microsoft Windows 64-bit operating systems only. For supported Windows platform information, see https://www.mysql.com/support/supportedplatforms/database.html.
There are different methods to install MySQL on Microsoft Windows.
MySQL Installer Method
The simplest and recommended method is to download MySQL Installer (for Windows) and let it install and configure a specific version of MySQL Server as follows:
Download MySQL Installer from https://dev.mysql.com/downloads/installer/ and execute it.
Unlike the standard MySQL Installer, the smaller web-community version does not bundle any MySQL applications, but downloads only the MySQL products you choose to install.
Determine the setup type to use for the initial installation of MySQL products. For example:
Developer Default : Provides a setup type that includes the selected version of MySQL Server and other MySQL tools related to MySQL development, such as MySQL Workbench.
Server Only : Provides a setup for the selected version of MySQL Server without other products.
Custom : Enables you to select any version of MySQL Server and other MySQL products.
Install the server instance (and products) and then begin the server configuration by following the onscreen instructions. For more information about each individual step, see Section 2.3.3.3.1, “MySQL Server Configuration with MySQL Installer”.
MySQL is now installed. If you configured MySQL as a service, then Windows automatically starts the MySQL server every time you restart the system. Also, this process installs the MySQL Installer application on the local host, which you can use later to upgrade or reconfigure MySQL server.
If you installed MySQL Workbench on your system, consider using it to check your new MySQL server connection. By default, the program automatically start after installing MySQL.
Additional Installation Information
It is possible to run MySQL as a standard application or as a Windows service. By using a service, you can monitor and control the operation of the server through the standard Windows service management tools. For more information, see Section 2.3.4.8, “Starting MySQL as a Windows Service”.
For a list of limitations on the use of MySQL on the Windows platform, see Section 2.3.7, “Windows Platform Restrictions”.
In addition to the MySQL Server package, you may need or want additional components to use MySQL with your application or development environment. These include, but are not limited to:
To connect to the MySQL server using ODBC, you must have a Connector/ODBC driver. For more information, including installation and configuration instructions, see MySQL Connector/ODBC Developer Guide.
MySQL Installer installs and configures Connector/ODBC for you.
MySQL Installer installs and configures MySQL Connector/NET for you.
MySQL for Windows is available in several distribution formats, detailed here. Generally speaking, you should use MySQL Installer. It contains more features and MySQL products than the older MSI, is simpler to use than the compressed file, and you need no additional tools to get MySQL up and running. MySQL Installer automatically installs MySQL Server and additional MySQL products, creates an options file, starts the server, and enables you to create default user accounts. For more information on choosing a package, see Section 2.3.2, “Choosing an Installation Package”.
A MySQL Installer distribution includes MySQL Server and additional MySQL products including MySQL Workbench, and MySQL for Visual Studio. MySQL Installer can also be used to upgrade these products in the future (see https://dev.mysql.com/doc/mysql-compat-matrix/en/).
For instructions on installing MySQL using MySQL Installer, see Section 2.3.3, “MySQL Installer for Windows”.
The standard binary distribution (packaged as a compressed file) contains all of the necessary files that you unpack into your chosen location. This package contains all of the files in the full Windows MSI Installer package, but does not include an installation program.
The source distribution format contains all the code and support files for building the executables using the Visual Studio compiler system.
For instructions on building MySQL from source on Windows, see Section 2.9, “Installing MySQL from Source”.
MySQL on Windows Considerations
Large Table Support
If you need tables with a size larger than 4GB, install MySQL on an NTFS or newer file system. Do not forget to use MAX_ROWS and AVG_ROW_LENGTH when you create tables. See Section 13.1.20, “CREATE TABLE Statement”.
MySQL and Virus Checking Software
Virus-scanning software such as Norton/Symantec Anti-Virus on directories containing MySQL data and temporary tables can cause issues, both in terms of the performance of MySQL and the virus-scanning software misidentifying the contents of the files as containing spam. This is due to the fingerprinting mechanism used by the virus-scanning software, and the way in which MySQL rapidly updates different files, which may be identified as a potential security risk.
After installing MySQL Server, it is recommended that you disable virus scanning on the main directory ( datadir ) used to store your MySQL table data. There is usually a system built into the virus-scanning software to enable specific directories to be ignored.