1. Startseite
  2. MySQL
  3. Entfernte Verbindung zu MySQL

Entfernte Verbindung zu MySQL

Übersicht

By default, MySQL permissions only permit same-server access for clients. This protects your database by preventing external access, but also precludes desktop database utilities like Navicat, MySQL Workbench, und Eclipse from managing your database schema.

Lösung

Create a new MySQL user within the Bedienfeld unter Databases > MySQL Manager.

  • Enter a user under Name
    • Remember: your newly-created user will be prefixed with your database prefix that precedes the input field
  • Enter a password under the Password field
  • Select Advanced mode
  • Enter a new host under the Host field
    • Only IP addresses are accepted
    • Use _ and % for single/multiple wildcards
      • 64.22._0.1 matches 64.22.10.1 and 64.22.90.1 but not 64.22.110.1
      • 62.22.% matches 64.22.68.1, 64.22.110.230, etc but not 64.23.110.230
      • 64.22.%.1 would match 64.22.68.1, 64.22.230.1, but not 64.22.230.2
  • Click Benutzer hinzufügen

A user has been created, but now requires database privileges:

  • Select Change Mode > List Users and Databases
  • Select the database under Edit DatabasesDatabase Name
  • Under User Privileges, select READ und WRITE
    • READ will permit the user to connect and issue SELECT statements
    • WRITE will permit INSERT, UPDATE, und DELETE
  • Click Save

Connect to the database using your server name (or domain name), and corresponding username + password previously created. Port is the default port 3306.

Aktualisiert am März 7, 2021

Verwandte Artikel