How to Add Multiple Hosts in phpMyAdmin on Synology

On Google, one can easily find how to add servers in the list presented on the login page of phpMyAdmin. But the results don’t apply if you are using the package ‘phpMyAdmin’ for Synology. With that package, one must edit the synology_server_choice.json file.

Click to Read More

If you are connected on your NAS via a SSH console, the file to be edited is located in /var/services/web/phpMyAdmin/synology_server_choice.json.

But you should also be able to access it from a Windows PC on \\<YourNAS>\web\phpMyAdmin\synology_server_choice.json on DSM 6.x or \\<YourNAS>\web_packages\phpmyadmin on DMS 7.x\synology_server_choice.json

To add a server, simply duplicate the first statement of the json file, separated with a comma:

[
{"verbose":"Server 1","auth_type":"cookie","host":"localhost","connect_type":"socket","socket":"\/run\/mysqld\/mysqld10.sock","compress":false,"AllowNoPassword":false},
{"verbose":"Server 2","auth_type":"cookie","host":"192.168.0.20","connect_type":"socket","socket":"\/run\/mysqld\/mysqld10.sock","compress":false,"AllowNoPassword":false},
{"verbose":"Server 3","auth_type":"cookie","host":"192.168.0.100","connect_type":"socket","socket":"\/run\/mysqld\/mysqld10.sock","compress":false,"AllowNoPassword":false}
]

Et voilà.

Loading


Categories:

Tags:


Comments

2 responses to “How to Add Multiple Hosts in phpMyAdmin on Synology”

  1. maximax88 Avatar

    Bonjour,

    J’ai essayé de faire cette manipulation en me connectant en root. Tout fonctionne, mais lorsque je redémarre le serveur, les données initiale reviennent. Y a-t-il une solution pour écrire définitivement le fichier?

    Merci pour le retour, je cherche depuis plusieurs jours sans avoir de réponse…

    1. vletroye Avatar

      Je dois avouer que je n’avais pas remarqué ça. DSM 6.x ou 7.x ?

      Je viens de faire un restart de mon DSM 7.x et la config est bien permanente.
      MAIS on voit que DSM la modifiée.
      Les déclarations de serveurs ne sont plus dans l’ordre où je les avais ajoutées.

Leave a Reply

Your email address will not be published. Required fields are marked *