Новости
Документация
Download
Webboard
Поиск
FAQ/ЧаВо
Обратная связь




MySQL.RU - Webboard



Вернуться
Как завести в MySQL юзера (Rinat Shabanov) 19/12/2001 - 12:09:41
      Re: Как завести в MySQL юзера (Василий) 19/12/2001 - 14:09:15

> Original message text:
> From: Rinat Shabanov - 19/12/2001 - 12:09:41
> Subject:Как завести в MySQL юзера
> -----------------
>
>
>
>
> Всем привет !!!
> Как завести пользоваиеля в MySQL. В данное время я работаю
> только под юзером root, а как мне еще добавить другого.
> FreeBSD 4.4 STABLE, MySQL 3.23.43
>
> With best, Rinat
>


From: Василий - 19/12/2001 - 14:09:15
Subject:Как завести в MySQL юзера
-----------------
вообще-то, в архивах форума должно быть не одно сообщение на эту тему.


GRANT priv_type [(column_list)] [, priv_type [(column_list)] ...]
ON {tbl_name | * | *.* | db_name.*}
TO user_name [IDENTIFIED BY 'password']
[, user_name [IDENTIFIED BY 'password'] ...] [WITH GRANT OPTION]

а потом вызвать

flush privileges;

взято из документации раздел 4.3

--------------------------------------------------------------
For the GRANT and REVOKE statements, priv_type may be specified as any of the following:

ALL PRIVILEGES FILE RELOAD
ALTER INDEX SELECT
CREATE INSERT SHUTDOWN
DELETE PROCESS UPDATE
DROP REFERENCES USAGE

ALL is a synonym for ALL PRIVILEGES. REFERENCES is not yet implemented. USAGE is currently a synonym for ``no privileges.'' It can be used when you want to create a user that has no privileges.

You can set global privileges by using ON *.* syntax. You can set database privileges by using ON db_name.* syntax. If you specify ON * and you have a current database, you will set the privileges for that database. (WARNING: If you specify ON * and you don't have a current database, you will affect the global privileges!)

In order to accommodate granting rights to users from arbitrary hosts, MySQL supports specifying the user_name value in the form user@host. If you want to specify a user string containing special characters (such as `-'), or a host string containing special characters or wild-card characters (such as `%'), you can quote the user or host name (for example, 'test-user'@'test-hostname').

You can specify wild cards in the hostname. For example, user@"%.loc.gov" applies to user for any host in the loc.gov domain, and user@"144.155.166.%" applies to user for any host in the 144.155.166 class C subnet.

The simple form user is a synonym for user@"%". NOTE: If you allow anonymous users to connect to the MySQL server (which is the default), you should also add all local users as user@localhost because otherwise the anonymous user entry for the local host in the mysql.user table will be used when the user tries to log into the MySQL server from the local machine! Anonymous users are defined by inserting entries with User='' into the mysql.user table.





[Это сообщение - спам!]

Последние сообщения из форума

Уважаемые посетители форума MySQL.RU!
Убедительная просьба, прежде чем задавать свой вопрос в этом форуме, обратите внимание на разделы:
- ответы на наиболее часто задаваемые вопросы - FAQ
- раздел документация
- раздел поиск по сообщениям форума и документации
Также, старайтесь наиболее подробно указывать свою ситуацию (версию операционной системы, версию MySQL, версию программного обеспечения, по которому возникает вопрос, текст возникающих ошибок, и др.)
Помните, чем конкретнее Вы опишете ситуацию, тем больше шансов получить реальную помощь.
 Имя:
 E-mail:
 Тема:
 Текст:
Код подтверждения отправки: Code
1253



РЕКЛАМА НА САЙТЕ
  Создание сайтов | |