Управління користувачами

Управління користувачами є процес контролю, які користувачі можуть підключатися до сервера MySQL і які дозволи у них є на кожній базі даних. phpMyAdmin не виконує жодного управління користувачами, він передає ім’я користувача і пароль до MySQL, який потім визначає, чи дозволено користувачу виконати певну дію. У phpMyAdmin, адміністратори мають повний контроль над створенням користувачів, переглядом і редагуванням привілеїв для існуючих користувачів, і видаленням користувачів.

Within phpMyAdmin, user management is controlled via the User accounts tab from the main page. Users can be created, edited, and removed.

Створення нового користувача

To create a new user, click the Add user account link near the bottom of the User accounts page (you must be a «superuser», e.g., user «root»). Use the textboxes and drop-downs to configure the user to your particular needs. You can then select whether to create a database for that user and grant specific global privileges. Once you’ve created the user (by clicking Go), you can define that user’s permissions on a specific database (don’t grant global privileges in that case). In general, users do not need any global privileges (other than USAGE), only permissions for their specific database.

Редагування існуючого користувача

To edit an existing user, simply click the pencil icon to the right of that user in the User accounts page. You can then edit their global- and database-specific privileges, change their password, or even copy those privileges to a new user.

Видалення користувача

From the User accounts page, check the checkbox for the user you wish to remove, select whether or not to also remove any databases of the same name (if they exist), and click Go.

Призначення привілеїв користувача для конкретної бази даних

Користувачі призначаються для баз даних шляхом редагування запису користувача (з User accounts посилання на головній сторінці). Якщо ви створюєте користувача спеціально для даної таблиці, вам спочатку потрібно створити користувача (без глобальних привілеїв) а потім повернутися і відредагувати цього користувача щоб додати таблицю та привілеї для окремої таблиці.

Налаштування меню та груп користувачів

By enabling $cfg['Servers'][$i]['users'] and $cfg['Servers'][$i]['usergroups'] you can customize what users will see in the phpMyAdmin navigation.

Попередження

This feature only limits what a user sees, they are still able to use all the functions. So this can not be considered as a security limitation. Should you want to limit what users can do, use MySQL privileges to achieve that.

Якщо увімкнено функцію User accounts інтерфейс керування отримує другу вкладку для керування User groups, де ви можете визначити, що кожна група буде переглядати (див. зображення нижче) і ви можете призначити будь-якого користувача до однієї з цих груп. Користувачам буде запропоновано спрощений користувацький інтерфейс, що може бути корисним для недосвідчених користувачів, які можуть бути перевантажені всіма функціями, які надає phpMyAdmin.

_images/usergroups.png