Home > Database > Mysql Tutorial > body text

How to configure mysql environment variables

下次还敢
Release: 2024-04-14 20:15:31
Original
810 people have browsed it

Method to configure MySQL environment variables: Download and install MySQL, set the PATH environment variable, add the "bin" folder of the MySQL installation directory, create the MYSQL_HOME environment variable, and set it to the MySQL installation directory. Enter the command mysql -V to verify the configuration. Is it correct

How to configure mysql environment variables

How to configure MySQL environment variables

Step 1: Download and install MySQL

Visit the MySQL official website https://www.mysql.com/ to download and install MySQL.

Step 2: Set the PATH environment variable

  • Open Control Panel (Windows) or Terminal (macOS/Linux).
  • Search for "environment variables".
  • In "System Variables", find the variable named "Path".
  • Click "Edit" and add the "bin" folder of the MySQL installation directory at the end. For example:
<code>C:\Program Files\MySQL\MySQL Server 8.0\bin</code>
Copy after login

Step 3: Set the MySQL_HOME environment variable

  • In "System Variables", create a new one named "MYSQL_HOME" variable.
  • Set its value to the MySQL installation directory. For example:
<code>C:\Program Files\MySQL\MySQL Server 8.0</code>
Copy after login

Step 4: Verify configuration

  • Open the command line window.
  • Enter the following command to verify whether the environment variables are configured correctly:
<code>mysql -V</code>
Copy after login

If the MySQL version information is displayed, it means that the environment variables are configured correctly.

The above is the detailed content of How to configure mysql environment variables. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template