"Mark Healey" <[EMAIL PROTECTED]> wrote:
> On Thu, 14 Aug 2003 15:19:46 +0300, Victoria Reznichenko wrote:
>
>>"Mark Healey" <[EMAIL PROTECTED]> wrote:
>>> I'm trying to learn to use mysql. I don't want to mess with the
>>> system databases so I decided create a database and user to play
>>> with but I can't seem to do it right.
>>>
>>> I logged in as root and created a database
>>>
>>> mysql> create database marksstuff;
>>> Query OK, 1 row affected (0.00 sec)
>>>
>>> I then granted priveleges to mark
>>>
>>> mysql> grant all on marksstuff.* to mark identified by 'password'; not the real
>>> password
>>> Query OK, 0 rows affected (0.01 sec)
>>>
>>> I then logged out and tried to login as mark
>>>
>>> [EMAIL PROTECTED] mark]$ mysql -u mark -ppassword
>>> ERROR 1045: Access denied for user: '[EMAIL PROTECTED]' (Using password: YES)
>>>
>>> What am I doing wrong?
>>
>>Delete anonymous user('') from table user. Don't forget about FLUSH PRIVILEGES.
>
> Thanks, that worked. Why?
Because when MySQL sorts records from the table user, entry for the user
''@'localhost' is sorted first than 'mark'@'%'. It is described at:
http://www.mysql.com/doc/en/Connection_access.html
>
> Exactly what does 'flush privileges' do anyway? It isn't mentioned in the
> O'reilly book.
Reloads privileges from tables in the database 'mysql'. You should run FLUSH
PRIVILEGES if you edit privilege tables manually (using INSERT, UPDATE, DELETE
commands).
>
> And now an unrelated question.
>
> Why isn't there a BOOL column type? As I was designing tables in my
> head I figured that there would one. So many things in life are
> boolean values.
Currently boolean type is not supported in MySQL. BOOL is a synonym for TINYINT(1).
--
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Victoria Reznichenko
/ /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED]
/_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net
<___/ www.mysql.com
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]