Home  >  Article  >  Database  >  How to set up remote connection in MySql8

How to set up remote connection in MySql8

王林
王林forward
2023-05-29 15:25:066180browse

    1. Log in to Mysql

    Open the terminal control panel and entermysql -uroot -pyour Mysql root passwordEnter

    Windows press win r and enter cmd and press Enter. In the control panel, enter mysql -uroot -p your Mysql root password Press Enter
    If the login is successful as shown in the picture,

    How to set up remote connection in MySql8

    2. Enter the mysql library

    and enter use mysql to switch the database, as shown in the figure. Switch successful

    How to set up remote connection in MySql8

    3. Execute update permission statement

    update user set Host='%' where User=' root'; Explanation: "%" refers to all addresses.
    As shown in the picture, the modification is successful

    How to set up remote connection in MySql8

    4. View permissions

    select host, user from user; View permissions.

    How to set up remote connection in MySql8

    5. Use the database connection tool to test the link

    Recommended database toolNavicat 15 Tool
    Click here to download (installation package and free usage tutorial) extraction code: uzd8

    5.1 Create a new connection

    How to set up remote connection in MySql8

    5.2 Data related information

    How to set up remote connection in MySql8

    The above is the detailed content of How to set up remote connection in MySql8. For more information, please follow other related articles on the PHP Chinese website!

    Statement:
    This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete