List:General Discussion« Previous MessageNext Message »
From:Nils Valentin Date:July 8 2003 12:31am
Subject:Re: Trouble creating users
View as plain text  
Hi Michael,

I am not a script person, but let me try to help you figuring out whats wrong.

First I assumed that the user executing the script has the necessary 
privileges t update the privilege database /datadir/mysql (for Linux f.e 
/var/lib/mysql/mysql) . 

The second I tried your SQL statement which works just fine.

So if I take out the SQL statement

eval "/path/to/mysql --user=root --password=***** 
--socket=/path/to/socket --database=mysql --execute=\"
...
\""
 
and then I would like you to take a sharp look at whats left, then there 
should perhaps be something with this part above. Perhaps the " at the very 
end is not escaped correctly (double) or something similar. The actual SQL 
statement works perfectly fine.

Best regards

Nils Valentin
Tokyo/Japan


2003年 7月 8日 火曜日 08:28、Michael Iatauro さんは書きました:
> I've been having a little trouble creating users cross-platform.  I have
> a little script that works just fine on Solaris 8 using this command:
>
> eval "/path/to/mysql --user=root --password=*****
> --socket=/path/to/socket --database=mysql --execute=\"INSERT INTO user
> (Host, User, Password, Select_priv, Insert_priv, Update_priv,
> Delete_priv, Shutdown_priv, File_priv, Create_tmp_table_priv,
> Lock_tables_priv) VALUES ('localhost', 'LocalUser', PASSWORD('******'),
> 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y')\""
>
> With the obvious changes to make the statement actually work.  However,
> if I move this over to Linux, I get Invalid Authorization Specification
> errors when I try to connect as LocalUser after a reload, and using
> GRANT seems never actually to grant privileges (e.g. no "Y"s in the user
> table).  Does anybody know how I can successfully create a user with my
> script?
>
> ~Michael Iatauro

-- 
---
Valentin Nils
Internet Technology

 E-Mail: nils@stripped
 URL: http://www.knowd.co.jp
 Personal URL: http://www.knowd.co.jp/staff/nils

Thread
Trouble creating usersMichael Iatauro8 Jul
  • concat() differences between mssql and mysqlOoks Server8 Jul
    • Re: concat() differences between mssql and mysqlEgor Egorov8 Jul
      • RE: concat() differences between mssql and mysqlAndy Eastham8 Jul
    • RE: concat() differences between mssql and mysqlDaevid Vincent8 Jul
      • RE: concat() differences between mssql and mysqlPaul DuBois9 Jul
  • Re: Trouble creating usersNils Valentin8 Jul
  • Re: Trouble creating usersMichael Iatauro8 Jul
    • Re: Trouble creating usersNils Valentin8 Jul
  • Re: Trouble creating usersMichael Iatauro8 Jul
    • Re: Trouble creating usersNils Valentin9 Jul
    • Re: Trouble creating usersPaul DuBois9 Jul