MySql 5.6. 35 winx 64 Installation Detailed Tutorial

  • 2021-07-09 09:25:33
  • OfStack

Because of the database version of the project started no error, but the process of operating the database error, in order to maintain the database 1 to, re-retrieve the installation of mysql5.6 tutorial, not complicated, need patience.

If other database versions were originally installed in the notebook, please uninstall the mysql database first. For details, please refer to the website: http://materliu.github.io/all/web/database/mysql/2014/04/24/uninstall-mysql-totaly.cm.html

In order to prevent the website from being inaccessible or non-existent, the specific steps are as follows:

1. First delete the MySQL service in the windows service and use the command sc delete mysql

2. Uninstall mysql in Control Panel.

3. Clean up the ini files in the mysql installation directory.

4. Clean up the registry:


HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\Eventlog\Application\MySQL  Directory deletion  
HKEY_LOCAL_MACHINE\SYSTEM\ControlSet002\Services\Eventlog\Application\MySQL  Directory deletion 
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\MySQL  Directory deletion (I didn't find it when I uninstalled it, and I still achieved the purpose of completely uninstalling it after a little.) 

5. Some mysql data files must also be deleted, for example: C:\ Documents and Settings\ All Users\ Application Data\ MySQL

Installing mysql 5.6

(1) In mysql official website https://dev.mysql.com/downloads/mysql/5. 6. html # downloads

Download the version that suits your computer system and unzip it to a disk directory.

(2) Configure environment variables

Add: D:\ mysql-5. 6.35-winx64/bin to Path;

(3) Create a new my. ini file and copy the my. ini file to the c:/windows directory

my. ini content:


[client]
port=3306
default-character-set=utf8
[mysqld] 
#  Set to your own MYSQL Installation directory of  
basedir=D:/mysql-5.6.35-winx64
#  Set to your own MYSQL Data directory of  
datadir=D:/mysql-5.6.35-winx64/data
port=3306
character_set_server=utf8
default-storage-engine=MYISAM
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES

(4) From the cmd command window, enter the bin directory under the MySQL decompression directory and enter the service installation command:


mysqld  In fact, in fact, the initialize 
mysqld.exe -install

After successful installation, the service will be prompted for successful installation.

(5) Start the mysql service

First determine that the mysql service has been shut down by:

Open the Task Manager process mysqld. exe. Right-click and close the service.

(6) Modify the mysql password

mysql has no password by default, and the username is root.

win+q Search command prompt, right-click-run as administrator

To enter the mysql installation directory, the author is: D:\ mysql-5. 6.35-winx64

Enter the command:


cd bin
mysql  In fact, in fact, the uroot
mysql>show databases; 
mysql>use mysql;
mysql>UPDATE user SET password=PASSWORD("123456") WHERE user='root';
mysql>FLUSH PRIVILEGES;  "Attention 1 Don't forget this sentence, otherwise the password change will not take effect. " 
mysql>QUIT

Related articles: