MySQL compressed version installation configuration, mysql compressed installation Configuration
Install and configure Mysql
1) modify the mysql configuration file
The default profile for mysql-5.7.11 is in mysql/my-default.ini, Or you create a my. ini file yourself
Bytes ----------------------------------------------------------------------------------------------
My. ini references
[Mysqld]
Basedir = "D:/Program Files/mysql-5.7.15-winx64"
Datadir = "D:/Program Files/mysql-5.7.15-winx64/data"
Port = 3306
Default-character-set = utf8
Default-storage-engine = innodb
Character_set_filesystem = binary
[Client]
Port = 3306
Default-character-set = utf8
[Mysql]
Default-character-set = utf8
Bytes --------------------------------------------------------------------------------------------
2) Configure Environment Variables
Bytes --------------------------------------------------------------------------------------------
Configure the bin directory path of mysql to path (not detailed)
Bytes --------------------------------------------------------------------------------------------
3) install mysql
Bytes --------------------------------------------------------------------------------------------
Open cmd and run:Mysqld-install
Run services. msc. Check that there is indeed a service named MySQL.
Bytes --------------------------------------------------------------------------------------------
4) initialize the data directory
Bytes --------------------------------------------------------------------------------------------
Open the mysql installation directory. If there is no data folder, enter:Mysqld -- initialize-insecure
Generate a user data with the root user name and empty password
Note:
Mysqld -- initializeAutomatically generate a random passwordRootUser, Unable to log on without a password.
If the data folder is not empty, the command cannot be executed. You can delete the data folder and run the preceding command again.
Bytes --------------------------------------------------------------------------------------------
Enter select version () in mysql to view mysql version information.
5) Enable the mysql service and log on to set the password
Bytes -------------------------------------------------------------------------------------------
Start mysql Service
Cmd input:Net start mysql
Log on to mysql
Cmd input: mysql-u root-p
Password: Press enter here.
Set Password
Set password for root @ localhost = password ('new password ');
Bytes ------------------------------------------------------------------------------------------
For details, refer:
Http://dev.mysql.com/doc/refman/5.7/en/data-directory-initialization-mysqld.html
How to delete MySQL
1) Close the service
Net stop mysql
2) delete a service item
C: \ mysql \ bin \ mysqld-nt.exe-remove
3) Delete the corresponding folder.