热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

phpmyadmin一个数据库的多个帐户-phpmyadminmultipleaccountsforonedatabase

Iwaswonderingifitwaspossibletohave1database,butmultiplelogins(sothatwhenadeveloper

I was wondering if it was possible to have 1 database, but multiple logins (so that when a developer leaves, we don't have to change the entire db password and all instances of it).

我想知道是否有可能有1个数据库,但有多个登录(这样当开发人员离开时,我们不必更改整个数据库密码及其所有实例)。

If that's possible, how would I do it? (I have NO experience with phpmyadmin aside from code related queries, I'm doing research for a friend who would be able to implement it)

如果可能的话,我该怎么做? (除了代码相关的查询,我没有phpmyadmin的经验,我正在为能够实现它的朋友做研究)

Thanks in advanced!

先谢谢了!

3 个解决方案

#1


1  

phpMyAdmin has a simple way of creating new SQL users. From the home screen, click on the database in the left column for which you want to add a new user. Click on the Privileges tab. At the bottom, there is a command labeled, "Add new user"; click that. Type in the username and password that you want to assign to the account. To restrict the user to that database, select "Grant all privileges on database."

phpMyAdmin有一种创建新SQL用户的简单方法。在主屏幕中,单击要添加新用户的左列中的数据库。单击“权限”选项卡。在底部,有一个标记为“添加新用户”的命令;点击那个。输入要分配给帐户的用户名和密码。要将用户限制为该数据库,请选择“授予对数据库的所有权限”。

Note: I'm using phpMyAdmin 3.4.7.1.

注意:我正在使用phpMyAdmin 3.4.7.1。

#2


1  

Yes that is possible. If you are using localhost, just login and create a new user and give the privileges for the database.

是的,这是可能的。如果您使用的是localhost,只需登录并创建新用户并授予数据库权限。

http://wiki.phpmyadmin.net/pma/user_management#Creating_a_new_user

If you are hosted server on Linux, there is an option to create new users and and assign to the databases with different privileges.

如果您是Linux上的托管服务器,则可以选择创建新用户并分配给具有不同权限的数据库。

#3


1  

Yes, it's quite simple. PhpMyAdmin validates logins against MySQL's user permissions list. Simply create multiple MySQL users with full privileges on the DB in question and give each admin their own user.

是的,这很简单。 PhpMyAdmin根据MySQL的用户权限列表验证登录。只需创建多个具有相关数据库完全权限的MySQL用户,并为每个管理员提供自己的用户。

It's easy to set this up from directly inside PhpMyAdmin. Just log in as a high-privilege user and click the "Privileges" tab. Then "Add New User" and specify the username, the host (generally localhost), a password and then create the user (with no privileges checked). Once the user is created, go back to the user list on the Privileges tab and click the edit button next to your new user. Then, under "Database-specific privileges", select the database you'd like to grant privileges... then just select all the rights you want to give this user and click "Go". This new MySQL user and password can now be issued to an admin so he/she can log into PhpMyAdmin, and it revoked at any time in the future.

从PhpMyAdmin中直接设置它很容易。只需以高权限用户身份登录,然后单击“权限”选项卡。然后“添加新用户”并指定用户名,主机(通常是localhost),密码,然后创建用户(未选中任何权限)。创建用户后,返回“权限”选项卡上的用户列表,然后单击新用户旁边的“编辑”按钮。然后,在“特定于数据库的权限”下,选择您要授予权限的数据库...然后只需选择要为此用户提供的所有权限,然后单击“开始”。这个新的MySQL用户和密码现在可以发给管理员,这样他/她就可以登录PhpMyAdmin,并在将来的任何时候撤销。


推荐阅读
author-avatar
眼睛Blank
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有