mysql 5.5. 56 Installation Free Configuration Method
- 2021-12-04 20:04:55
- OfStack
The configuration method of mysql 5.5. 56 installation-free version is explained in detail by text code, and the specific contents are as follows:
1. Download mysql-5. 5.56-winx64
Website: dev. mysql. com/downloads/mysql/
2. Unzip the MySQL compressed package
Will be downloaded with the MySQL Unzip the compressed package to the custom directory , My unzipped directory is :
"D:\Program Files\mysql-5.5.56-winx64"
The default file in the directory will be unzipped my-default.ini Copy 1 Forty, renamed my.ini
Copy the following configuration information to my.ini Save
# If not my-default.ini, You can build it yourself my.ini Or get it from somewhere else
#########################################################
[client]
port=3306
default-character-set=utf8
[mysqld]
port=3306
character_set_server=utf8
basedir=D:\Program Files\mysql-5.5.56-winx64
# Extract directory
datadir=D:\Program Files\mysql-5.5.56-winx64\data
# Unzip directory data Directory
sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
[WinMySQLAdmin]
D:\Program Files\mysql-5.5.56-winx64\bin\mysqld.exe
#########################################################
3. Add environment variables
Do the following:
1) Right-click my computer- > Attributes- > Advanced System Settings (Advanced)- > Environment variable
Click the New button under System Variables
Input variable name: MYSQL_HOME
Input variable value: D:\ Program Files\ mysql-5. 5.56-winx64
# is the custom extract directory for mysql.
2) Select Path in the system variable
Click the Edit button
Add variable value to variable value:% MYSQL_HOME%\ bin
Note that this variable is added after the original variable value, using; You cannot delete the original variable value.
4. Register mysql as an windows system service
1) Enter the bin directory under the MySQL unzipped directory from the console:
2) Enter the service installation command:
mysqld install MySQL --defaults-file="D:\Program Files\mysql-5.5.56-winx64\my.ini"
# Unzip the modified my. ini file in the directory
After successful installation, the service will be prompted for successful installation.
# Note: The my. ini file is placed in the root directory of MySQL after extraction
# Remove service command is: mysqld remove
5. Start the MySQL service
Method 1:
The command to start the service is:
net start mysql
Method 2:
Open the administrative tool service and find the MySQL service.
Start the service by right-clicking Start or directly clicking Start on the left.
6. Change the password of root account
When the installation is completed, the default password of root account is empty, and the password can be changed to the specified password at this time. For example: 123456. (Note: The mysql command ends with;)
c:>mysql - uroot
mysql>show databases;
mysql>use mysql;
mysql>UPDATE user SET password=PASSWORD("123456") WHERE user='root';
mysql>FLUSH PRIVILEGES;
mysql>QUIT
7. MySQL console shortcut creation:
1) Right-click on the desktop-
>
New-
>
Shortcuts-
>
Object location input: C:\ Windows\ System32\ cmd. exe
The shortcut name is defined and determined by yourself, and the shortcut is successfully established
2) Right-click the shortcut you just created- > Attributes- > Modify the Target 1 column to MySQL startup parameters:
C:\Windows\System32\cmd.exe "D:\Program Files\MySQL\mysql-5.6.13-win32\bin" /k mysql -uroot -p inventory
Explanation: CMD Path "MySQL Path bin Directory"/k mysql-u Username-p Password Database Name
3) After the modification, click OK to save, and directly double-click the shortcut to connect to the MySQL database
Summarize