dongxie5698 2016-03-06 12:31
浏览 36
已采纳

CPanel SQL:需要远程访问,CPanel或WHM中没有授予权限

I'm looking for a fix, but I'd gladly settle for an alternative.

Problem: I am designing an application in Java, It's requirement is to once every night, sync to a server database. More than one laptop will be running this application, and from dynamic IP addresses. I have created and restricted permissions to their SQL accounts from the cPanel interface (not from phpmyadmin, no grant privileges to do so). I need to grant these restricted accounts Wildcard permission to allow the app to do it's work. Neither myself nor the web-host re-seller have access to root or have grant permission. So i cannot allow selected users permissions to remote access.

I Can however, allow all users (which includes the unrestricted users), remote access from Wildcard IP address through the cPanel interface. I can remotely gain access through my Java program this way. However There are security concerns and so I don't want to use this option.

  1. I have very little experience with web-hosting, if i managed to transfer the domain to a different provider, could this alleviate my grant problems?
  2. Is it possible to query custom php and gain access through Local permissions to return database contents? (sorry almost no experience with php).
  3. If i have no Root access, would allowing wildcard on all users be that problematic?

_ _

Any thoughts or suggestions would be greatly appreciated.

P.S. I realise this is very poorly structured and has more than one question. This problem seems to be unique, I haven't been able to find any specific information that fulfilled my needs.

  • 写回答

1条回答 默认 最新

  • dongpu5874 2016-03-15 13:56
    关注

    Personally, I would not open your database to the internet. It's a security risk and also most hosts will block this anyway.

    Your second option is the one I would go with, creating an API which runs on the server, authenticates the clients, and then exposes only the API to the internet (or, since you have control over the clients, maybe even only by VPN!), which then interacts with the database.

    A backup plan would be VPN access to the server; if your client can VPN to the host network then you can allow your clients direct access to the database.

    About your question 3, if you don't have root access you'll still either have permissions to edit users or not; being able to grant users permission (even with a wildcard host) is independent of being the root user, so you may or may not have this level of access and it's impossible to tell based only on your username alone.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效
  • ¥15 悬赏!微信开发者工具报错,求帮改