• notice
  • Congratulations on the launch of the Sought Tech site

MYSQL5.6.24 Installation Configuration Method Graphic Tutorial

Due to work needs, I started to use the mysql database.It has not been used for a long time.I basically forgot about it.I re-installed and configured it today, and write an essay, so as not to look through it when I need it in the future.If it is incorrect or needs to be added, I hope you leave a lot of comments.

First download mysql, I directly downloaded "mysql-5.6.24-win32.1432006610" version

After the download is complete.I first unzip it to the C drive.Then, change the name of the folder to "mysql" and the directory structure is as follows

Under the root directory, there is a file named "my-default.ini", modified to.'my.ini', which is also convenient for later configuration, so you should type less.Be lazy~

Open this configuration file, it turned out to be

Remove the "#" in front of the place where the red box is drawn.It must be removed, otherwise mysql cannot read this configuration.Then, write basedir and datadir as your installation directory, otherwise the service will not be available later.Way to start

After the modification, close the file and start setting environment variables.

Right click on My Computer -> Properties -> Advanced System Settings, click the New button under System Variables

Click New, a confirmation box pops up

Enter the variable name: MYSQL_HOME

Enter the variable value: the installation directory of mysql, in my case it is C:\mysql

OK, save

Find Path in the environment variable, select it, and click the edit button

Add at the end;%MYSQL_HOME%\bin;

Note: Add this variable after the variable value, separated by ;, the original variable value cannot be deleted.

----------------------------------------------- -------------------------------------------------- --------

After the modification, the preparations are done, and then, you can start the installation.

Enter the familiar black box, cmd

cd mysql installation directory, then enter mysqld --install MySQL --defaults-file="c:\mysql\my.ini" and press Enter

Prompt that the service is installed successfully

At this time, mysql is still not available, because after the installation is complete, the service must be started

Enter net start MySQL

Posted here, stop and uninstall commands

Start, stop and uninstall of MySQL service

Start: net start MySQL

Stop: net stop MySQL

Uninstall: sc delete MySQL

Note: Error 2 and Error 1067 often appear at this time.

If there is "Error 2 The system cannot find the file", check whether the configuration file has been modified or whether you enter the bin directory to operate.If the configuration file is modified correctly and the bin folder is entered, you need to delete mysql first (input mysqld -remove) and reinstall (enter mysqld -install);

If error 1067 occurs, it is a configuration file modification error.Confirm whether the configuration file is correct.

PS: After the service is started successfully, you can log in, enter mysql -u root -p (the first time you log in without a password, just press enter)

Tags

Technical otaku

Sought technology together

Related Topic

0 Comments

Leave a Reply

+