Hamlin Nicholas-qa568 writes:
> I have added some extra fields to the mysql.user table, namely:
> full_name VARCHAR(255)
> job VARCHAR(255)
> location VARCHAR(255)
> phone VARCHAR(255)
> reminder VARCHAR(255) NOT NULL
> ip_addr VARCHAR(255) NOT NULL
> 
> I want to store these values for each person that creates a new account on my 
>database.
> 
> The database is still in production test mode, so I was adding some "dummy" users.  
>The statement to create the account is:
> "INSERT into user (
>     Host,
>     User,
>     Password,
>     full_name,
>     job,
>     location,
>     phone,
>     reminder,
>     coreID,
>     ip_addr
>     )
>     VALUES ('%','yessir',PASSWORD('yesyesyes'),'Nathan 
>Lanier','Yes-man','FL-SE','123-1234','yesyesyes','161.161.1.131')"
> 
> I kept getting "Access Denied" errors for this user.  I scoured the newsgroup 
>archives for this problem, and tried every bit of advice on MySQL.com's documentation 
>under 4.2.10, and nothing helped.  I restarted the mysqld, and nothing helped.  I 
>needed to make sure that I could still create new users, so, I tried:
> 
> "INSERT into user (
>     Host,
>     User,
>     Password,
>     full_name,
>     job,
>     location,
>     phone,
>     reminder,
>     coreID,
>     ip_addr
>     )
>     VALUES ('%','newUser',PASSWORD('yesyesyes'),'Nathan 
>Lanier','','','','yesyesyes','161.161.1.131')"
> 
> This one works perfectly.  I narrowed the problem down to the job column, so I 
>deleted the value for user 'yessir'.  It worked!  In order to then figure out why 
>some accounts with values in the job column work and user 'yessir' didn't, I tried 
>various values for the job column.  Thinking it was the hyphen, I put in "Yesman" and 
>it worked!  But, I have another user with 'Heave-ho' as it's job and that one works 
>fine.  So, it's not the hyphen.  Very strange.  
> 
> I think that the "Yes-" is throwing it off.  But, if that was so, why can I change 
>the "reminder" column, on the same account, to be "Yes-yesyes" and the account still 
>works?  Is there some limitation to using the keyword "job"?  The column "full_name" 
>resides before "job" in the table, so I don't think that it's conflicting with the 
>order of the priviledge columns.
> 
> Any ideas would be appreciated so that I can make sure that some unsuspecting user 
>doesn't throw some value in their entry that will cause the system not to work for 
>them.  Or maybe there's a better way of going about this?
> 
> Nicholas Hamlin


Tables in mysql databases are not designed to be changed in any single
fashion. 

ALTERing will completely break security and permission systems and
will even prevent MySQL from proper functioning.

And you can only access them via GRANT / REVOKE command.

-- 
Regards,
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Mr. Sinisa Milivojevic <[EMAIL PROTECTED]>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Fulltime Developer
/_/  /_/\_, /___/\___\_\___/   Larnaca, Cyprus
       <___/   www.mysql.com


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to