cPanel /主机/访问 phpMyAdmin
我拥有主机和 cPanel 访问权限,但只有一个 cPanel 主用户和密码。
我想授予某人访问 phpMyAdmin 的权限,但不想向该人提供我的 cPanel 主用户和密码。
有没有办法让某人访问 phpMyAdmin 但不能访问 cPanel?
I have a host and cPanel access but only one main user and password to cPanel.
I want to give someone access to phpMyAdmin but don't want to give that person my main user and password for cPanel.
Is there anyway to give someone access to phpMyAdmin but not cPanel?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
cPanel 附带的 phpMyAdmin(在 3rdparty 目录中)显然是通过 cpanel 身份验证来保护的,所以答案是“否”。
您可以安装自己的 phpMyAdmin(也许它甚至可以在脚本中心/一键安装程序中使用)并将其设置为使用您的自定义 MySQL 用户直接在 MySQL 服务器上进行身份验证,或者只是让您的用户输入他的凭据你已经提供了。
The phpMyAdmin which comes with cPanel (in the 3rdparty-directory) is apparently secured with the cpanel-authentication, so the answer is "no".
You could install your own phpMyAdmin (maybe it's even available in the script-center/one-click-installer) and set it up to directly authenticate on the MySQL-server with your custom MySQL-user or just let your user enter his credentials which you have supplied.
当我在寻找这个问题的答案时,我发现以下方法可以为我完成这项工作:
如何直接从我的域访问 phpMyAdmin?
这对我来说效果很好,尽管我使用的是与 Siteground 不同的托管提供商。
我遵循的步骤:
请注意此额外的安全措施:
As I was looking for an answer to this question, I found the following method that did the job for me:
How to access phpMyAdmin directly from my domain?
This worked well for me, although I'm using a different hosting provider then Siteground.
Steps I followed:
Please note this extra security measure:
如果不提供直接 cPanel 访问权限,您就无法直接访问 phpMyAdmin。
这是 cPanel 的一项安全措施,因为 phpMyAdmin 被认为是有史以来最常被利用的 PHP 应用程序之一。仅在您通过登录 cPanel 开始会话后才可用。
一个很好的解决方法是执行以下操作:
为其他人创建一个 MySQL 用户。将该 MySQL 用户分配给您的数据库。这两者都是通过以下方式完成的:
cPanel -> MySQL 数据库
之后,您需要通过在远程 MySQL 连接中添加他/她的 IP 地址来允许其他人访问 - 这也是 cPanel 中的一个工具
之后,其他人将能够连接到您的数据库无需直接访问 cPanel 或 phpMyAdmin,可以使用 MySQL WorkBench 等软件来完成
You cannot give direct access to your phpMyAdmin without providing direct cPanel access as well.
This is a security measure from cPanel as phpMyAdmin is known to be one of the most exploited PHP applications of all time. It is only available after you start your session by logging into cPanel.
A nice work-around this is to do the following:
Create a MySQL User for the other person. Assign that MySQL User to your Database. Both of those are done through:
cPanel -> MySQL Databases
After that you need to allow access for the other person by adding his/hers IP address in your Remote MySQL Connection - this is also a tool in cPanel
After that the other person will be able to connect to your Database without direct access to your cPanel nor phpMyAdmin, it can be done using software like MySQL WorkBench
cPanel 用户帐户有权控制 cPanel 帐户下所有创建的数据库,并且由于 cPanel 中的 phpMyAdmin 使用 cPanel 身份验证,因此您将自动重定向到 phpMyAdmin 控制页面,而无需询问登录信息。
您的目标可以通过更改 cPanel 密码来完成,而无需更改 mysql 用户密码。
您可以执行以下步骤:
1 - 创建 MySQL 用户并将该用户添加到具有完全权限的数据库中。
2 - 创建新的 cPanel 帐户 通过新帐户登录 更改新的 cPanel
3 - 通过“更改密码”用户密码并取消选中允许 MySQL
密码更改。
4 - 从新的 cpanel 帐户中单击 phpMyAdmin,然后您
将要求输入登录信息
5- 输入创建的 mysql 的登录信息
步骤 1 中的用户。
您现在可以登录所需的数据库,无需旧帐户 cPanel 信息。
还有一个解决方案是将/usr/local/cpanel/base/3rdparty/phpMyAdmin复制到/usr/local/apache/htdocs并通过http登录: //ip/phpMyAdmin
不要忘记将 /usr/local/apache/htdocs/phpMyAdmin/config.inc.php 中的 auth_type 更改为 http或饼干
cPanel user account has a privileges to control all created databases under cPanel account, And because phpMyAdmin in cPanel is using cPanel authentication you are automatically redirected to the phpMyAdmin control page without asking for login info.
Your target could be done with changing cPanel password without changing mysql user password.
You can do the following steps :
1 - Create MySQL user and add this user to database with full privs.
2 - Create new cPanel account Login through new account Change new cpanel
3 - user password through "Change Password" And un-check Allow MySQL
password change.
4 - Click phpMyAdmin from the new cpanel account and you
will be asked for login info
5- Type the login info of the created mysql
user in step1.
You can now login to the required database without old account cPanel info.
There is another soln is to copy /usr/local/cpanel/base/3rdparty/phpMyAdmin to /usr/local/apache/htdocs and login through http://ip/phpMyAdmin
Don't forget to change the auth_type in /usr/local/apache/htdocs/phpMyAdmin/config.inc.php to http or cookie