Re: Script to control mysql users?
| From: | Mike Tsapenko | Date: | Thu, 29 Aug 2002 22:19:15 +0000 |
| Subject: | Re: Script to control mysql users? | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-21469@lists.php.net to get a copy of this message | ||
You can use the following command sequence to add admin user:
shell> mysql --user=root mysql
mysql> GRANT ALL PRIVILEGES ON *.* TO admin@localhost
IDENTIFIED BY 'some_password' WITH GRANT OPTION;
mysql> GRANT ALL PRIVILEGES ON *.* TO admin@"%"
IDENTIFIED BY 'some_password' WITH GRANT OPTION;
mysql> FLUSH PRIVILEGES
You also can make a script executing this SQL-queries from root user.
--
============
Mike Tsapenko
Chief of Web-development Dept.
AlarIT
http://www.AlarIT.com
"Leif K-Brooks" <eurleif@buyer-brokerage.com> ???????/???????? ? ????????
?????????: news:3D6E2840.3050106@buyer-brokerage.com...
> I need to add mysql users to some databases, but my dumb control panel
> (ensim) doesn't seem to have a feature to do that, and I'm nothing in
> the mysql database. Does anyone have a script to let me add them
> automaticly if I supply it with the root password?
>