Home  >  Article  >  Database  >  How to solve the 1067 error when installing mysql

How to solve the 1067 error when installing mysql

藏色散人
藏色散人Original
2023-02-14 10:59:391993browse

Solution to the 1067 error when installing mysql: 1. Close all mysql server processes by entering the "sc delete mysql" command; 2. Check whether the mysql installation file directory contains Chinese characters, and delete it if it contains Chinese characters. Then reinstall MySQL.

How to solve the 1067 error when installing mysql

The operating environment of this tutorial: Windows 10 system, mysql5.6 version, Dell G3 computer.

How to solve the 1067 error when installing mysql?

Mysql detailed installation tutorial and 1067 error code solution

Download mysql

First step: Log in to the mysql official websitehttps://dev.mysql .com/

Step 2: Find the appropriate version to download

  • Click MySQL Community on the left side of the screen Downloads

  • Then click MySQL Community Server

  • After entering, you will find that the version is 8Version, click Looking for previous GA versions? in the upper right corner of the screen, wait a little time

  • When you find that you can select a version, convert the version to5.6 version, move the mouse to the bottom, select the appropriate operating system to download (win32/win64), and click download. At this time, a LOGIN and Sign Up will pop up. Don't click on it. Click on the bottom left.

    No thanks, just start my download.

  • ##Step 3: Select a suitable location to store on your computer. Note that the storage file name

    should be in English as much as possible to avoid use Chinese. Otherwise, it may cause an error in the final operation (execution error: 1067)

  • Step 4: Extract the downloaded compressed package to the current folder

Configure mysql

  • Step one: Open the folder directory, you will see the my-default.ini configuration file, copy this configuration file in a

    Utf-8 encoding Open it in a software, such as (pycharm/notepad, etc.), do not open it directly in windows (because the default encoding of windows is jbk encoding)

  • Step 2: Rename the copied my-default.ini to my.ini in **pycharm software, delete all the contents in my-default.ini, and copy the following code into it.

    [mysql]
    # 设置mysql客户端默认字符集
    default-character-set=utf8 
    [mysqld]
    #设置3306端口
    port = 3306 
    # 设置mysql的安装目录
    basedir=C:\Program Files\mysql-5.6.39-winx64  
    # 设置mysql数据库的数据的存放目录
    datadir=C:\Program Files\mysql-5.6.39-winx64\data 
    # 允许最大连接数
    max_connections=200
    # 服务端使用的字符集默认为8比特编码的latin1字符集
    character-set-server=utf8
    # 创建新表时将使用的默认存储引擎
    default-storage-engine=INNODB
  • Step 3: After copying, check whether each piece of code has hidden spaces, and then modify the basedir and datadir parameters.

    basedir=The current path where mysql is stored, datadir=The current path where the data folder in mysql is stored, save after modification

  • Step 4: Save the my Re-paste the .ini file to the same path as my-default.ini. Remember:

    Do not delete my-default.ini

Configure environment variables

  • Operation steps: Open settings--"Enter in search settings to view advanced system settings--"Click environment variables--"Double-click path

    --"Click New and add Copy the bin file path under the mysql file to the new path

  • ##Install and start the MySQL service

    Step 1: Enter cmd in the screen search box and run as administrator
  • ##Step 2: Enter
  • mysqld install
  • and press Enter to run and install the mysql service. When prompted, enter

    net start mysql to start the service.

    Report 1067 fault error solution

1. First enter

sc delete mysql
    to delete mysql Shut down all server processes
  • 2. Check whether your mysql installation file directory contains Chinese characters. If so, delete the Chinese characters and start over from the steps of installing mysql (be sure to check whether there are any redundant characters in the my.ini file). spaces, otherwise an error will occur)

Recommended study: "MySQL Video Tutorial"

The above is the detailed content of How to solve the 1067 error when installing mysql. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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