1, first in the Control Panel-management tools-services to stop the MySQL service
2. Then locate the My.ini file in the MySQL installation directory and open it using Notepad.
My.ini may also be under C:\Windows, please search for the C-drive My.ini file.
3. Find [mysqld] under Port
Must be [mysqld] under Port
For example:
# The TCP/IP Port the MySQL Server willlisten on
port=3306
4, change 3306 to the port you want (from 1024 to 65535), of course, and the other used port burst suddenly, and then save
5, again in the service to start MySQL, this time the MySQL port has been modified, the original has used the program, please also modify the port together.
Delete the test library from MySQL
MySQL library is a test library generated when the database is installed, in the MySQL database by default, the test name or test start of the database can be any user access operation can be logged! Specific can
SELECT * from mysql.db where user= ' \g look. So for the sake of database security we will remove the test library from the actual project deployment to avoid leaving a hidden danger.
Go to MySQL database:
Query how many libraries: Show database;
Delete Test library: drop database test;
View Delete or not: show databases;
View Port Method method one
Log in to Database
Enter show global variables like ' port ' after MySQL; don't write it wrong, remember to write the semicolon in the English state
Method Two:
Input Netstat-ano
How to log in after Port modification: Modify Port Login: mysql-hlocalhost-uroot-p123456
How Windows systems modifies the MySQL port