Hi Todd, Thank you for the reply.
I once more created an account. See below the "SHOW GRANTS FOR usertest" command. I did login without setting a default database. If you use the first command * then you will only be able to login (no other privileges), depending on the mysql version you will be able to do a show databases, but thats it. That is the same like you said before all privileges are set to N. See the example below. 2003年 8月 4日 月曜日 12:11、Todd Cary さんは書きました: > I did some experimenting and here is what I found: > > grant all > > -> on * > > -> to bugsbunny indentified by 'bugs > > -> with grant option; > > After putting the above into MySQL as root, I signed on as "todd" with > the appropriate PW and tried to get into mysql with > > mysql -u bugsbunny -p [using bugs as the PW]. I was refused > [EMAIL PROTECTED] is refused. I noticed that all of the > privileges were set to "N". > mysql> select database(); +------------+ | database() | +------------+ | | +------------+ 1 row in set (0.00 sec) mysql> grant all on * to usertest identified by 'usertest'; Query OK, 0 rows affected (0.00 sec) show grants for usertest; +--------------------------------------------------------------------------------------------------------------+ | Grants for [EMAIL PROTECTED] | +--------------------------------------------------------------------------------------------------------------+ | GRANT USAGE ON *.* TO 'usertest | | GRANT ALL PRIVILEGES ON `mysql`.* TO 'usertest | | GRANT ALL PRIVILEGES ON `training_db`.* TO 'usertest | +--------------------------------------------------------------------------------------------------------------+ > Then I tried > > grant all > > -> on *.* > > -> to bugsbunny indentified by 'bugs' > > -> with grant option; > > > I was refused again with the same message however all of the privileges > were set to "Y". > > Lastly, I tried > > -> on *.* > > -> to [EMAIL PROTECTED] indentified by 'bugs' > > -> with grant option; > > I was able to gain access and all of the privileges were set to "Y". The second command creates the rights which I believe you wanted mysql> grant all on *.* to usertest identified by 'usertest'; Query OK, 0 rows affected (0.00 sec) mysql> show grants for usertest; +----------------------------------------------------------------------------------------------------------------------+ | Grants for [EMAIL PROTECTED] | +----------------------------------------------------------------------------------------------------------------------+ | GRANT ALL PRIVILEGES ON *.* TO 'usertest'@'%' IDENTIFIED BY PASSWORD '*eae699f6230d578dc275ddd6c5b37db11db529532a70' | | GRANT ALL PRIVILEGES ON `mysql`.* TO 'usertest'@'%' | | GRANT ALL PRIVILEGES ON `training_db`.* TO 'usertest'@'%' | +----------------------------------------------------------------------------------------------------------------------+ 3 rows in set (0.00 sec) See the difference ;-). The first line says it all the other two are only dependent sub privileges. That crresponds to your observation that all privleges are set to Y. In both cases you are able to login, but in case 1 you have very restricted rights. Try "SELECT USER()" to see which user account mysql is using currently. Then use the "SHOW GRANTS FOR" command to see which privileges are set. Best regards Nils Valentin > > The "%" in the Host column does not appear to work for me, and there is > something different about "*" and "*.*". > > Todd > > Nils Valentin wrote: > >Hi Todd, > > > >2003年 8月 4日 月曜日 08:01、Todd Cary さんは書きました: > >>Nils - > >> > >>What is the difference between "*.* " and "* "? > > > >Hi Todd I just double checked. > >There is no difference. Both work the same way. I originally thought that > > the first one wouldn't have worked, but I checked it now. However I > > believe that *.* is the prober syntax. > > > >>Does Grant All give the user the rights to create a DB? > > > >The below command allows the user todd all privileges > > (CREATE,INSERT,DELETE, UPDATE etc.) . The "with grant option" will also > > allow the user todd to create new users. > > > >About the command itself, I just doule checked once more. > > > >If you specify only the username then a wildcard is insert for the > > hostname (%) which allows the user todd to be able to login from > > anywhere. make sure thats what you really want !! > > > >In any other case you could specify the user as '[EMAIL PROTECTED]' to limit > > it to only the one host. > > > >Best regards > > > >Nils Valentin > >Tokyo/Japan > > > >>Many thanks.... > >> > >>Todd > >> > >>Nils Valentin wrote: > >>>Hi Todd, > >>> > >>>try this > >>> > >>>grant all > >>>-> on *.* > >>>-> to todd indentified by 'my_password' > >>>-> with grant option; > >>> > >>> > >>>I believe you forgot the ".* " wich I added after grant all on... > >>> > >>>Best regards > >>> > >>>Nils Valentin > >>>Tokyo/Japan > >>> > >>>2003年 8月 4日 月曜日 01:52、Todd Cary さんは書きました: > >>>>I have installed Red Hat 9 and it installs MySQL. After logging on as > >>>>root, I did the following: > >>>> > >>>>mysql > >>>>mysql> use mysql; > >>>>mysql> grant all > >>>>-> on * > >>>>-> to todd indentified by 'my_password' > >>>>-> with grant option; > >>>> > >>>>I then log out of mysql and log out as root. Logged in as "todd" I > >>>> type the following: > >>>> > >>>>mysql -u todd -p > >>>> > >>>>I type in my password and I get the following error: > >>>> > >>>>Acess denied for [EMAIL PROTECTED] > >>>> > >>>>When I was in mysql as root, "select * from user" has "todd" listed. > >>>> > >>>>What have I missed? > >>>> > >>>>Todd -- --- Valentin Nils Internet Technology E-Mail: [EMAIL PROTECTED] URL: http://www.knowd.co.jp Personal URL: http://www.knowd.co.jp/staff/nils -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]