+234 907 428 8984 support@hostbility.com
Affiliate Program 24x7x365 Support

Knowledgebase

How to Allow Remote Connection to MySQL Server through Windows Command Prompt? Print

  • 0

This article will guide you through enabling remote access to the MySQL server using the Windows command prompt. However, you can also perform the same steps with MySQL command-line client or phpMyAdmin.

  1. Open command prompt. (Press Start + R, type cmd in Run box and hit Enter)


  2. At command prompt, navigate to path C:\Program Files\MySQL\MySQL Server 5.X\bin and run following command. It will prompt you for the password of MySQL root user. Enter password and MySQL prompt will be displayed.

    mysql -u root -p
  3. At MySQL prompt, create a remote user account with root privileges, run the following commands.

    MySQL Prompt

    GRANT ALL PRIVILEGES ON *.* TO 'USERNAME'@'IP' IDENTIFIED BY 'PASSWORD';
  • USERNAME: Username you wish to connect to MySQL server.

  • IP: Public IP address from where you wish to allow access to MySQL server.

  • PASSWORD: Password of the username used.

    IP can be replaced with % to allow user to connect from any IP address.

  1. Flush the privileges by following command and exit.

    FLUSH PRIVILEGES;
    exit;


Was this answer helpful?

« Back

Copyright © 2024 HOSTBILITY. All Rights Reserved.