MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Hamlin Nicholas-qa568 Date:January 14 2002 6:19pm
Subject:Weird problem with mysql database
View as plain text  
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
Thread
Weird problem with mysql databaseHamlin Nicholas-qa56814 Jan
  • Re: Weird problem with mysql databaseSinisa Milivojevic14 Jan
  • RE: Weird problem with mysql databaseRoger Baklund14 Jan
RE: Weird problem with mysql databaseHamlin Nicholas-qa56814 Jan