How Windows systems modifies the MySQL port

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.