Install mysql in windows and mysql in windows
This article focuses on mysql decompression version in windows installation and configuration, on the official website license mysql-cluster-gpl-7.3.7-winx64.
Choose computer> Properties> advanced system Settings> environment variables, and add your mysql root directory (note that it is not overwritten) after the path variable, such as:; D: \ mysql-cluster-gpl-7.3.7-winx64 \ bin.
Create a new my. ini file under the root directory. Add the following content:
[Mysql] # set the default character set of the mysql client default-character-set = utf8 [mysqld] # set port 3306 to port 3306 # set the mysql installation directory basedir = D: \ mysql-cluster-gpl-7.3.7-winx64 # Set the mysql database data storage directory datadir = D: \ mysql-cluster-gpl-7.3.7-winx64 \ data # maximum number of connections allowed max_connections = 200 # the character set used by the server defaults to an 8-bit latin1 character set character-set-server = utf8 # The default storage that will be used when creating a new table engine default-storage-engine = INNODB
Open a command prompt, enter the D: \ mysql-cluster-gpl-7.3.7-winx64/bin directory, and run the command: mysqld-install to install mysql to a windows service. After the execution is successful, the system prompts Service successfully installed.
Run mysqld-remove to uninstall the service. Then run: net start mysql at the command prompt to start mysql.
To stop the service, enter the command: net stop mysql.
To set whether mysql is automatically started, enter service. msc in the Start Menu> running to open service management.
When logging on, enter mysql-u root-p. If you have not set a password, press Enter.
For the sake of security, you can set a password first after entering. There are many methods to set a password. Here we will introduce one: set password = password ('your password'); here we will take 123456 as an example.
The password will be used for the next login.
Exit mysql and run the quit command; or exit ;.