No, I meant an MySQL command like mysqladmin or something like that...
or just maybe a grant command instead of doing raw inserts...

Cheers,

Bernard 

> -----Original Message-----
> From: DongInn Kim [mailto:[EMAIL PROTECTED] 
> Sent: Friday, May 05, 2006 14:34
> To: Bernard Li
> Cc: [email protected]
> Subject: Re: [Oscar-users] How to recover from a lost DB ?
> 
> It should be set up when the "create_database" subroutine of 
> oda.pm is run.
> Yes, maybe it is possible on the old oda interface (command 
> line) but I
> don't think that that kind of command line (or shortcut) exist because
> this interface is also set up after the database is created. 
> Probably we
> can do some experiment with raw oda command and then make a 
> shortcut to
> do this kind of work.
> But this is going to be one-time shot and will not work on 
> oscar 5.0 or
> so because the new oda does not have the command line interface.
> If we need, I would like to set up this kind of stuff on trunk.
> 
> Regards,
> 
> - DongInn
> 
> Bernard Li wrote:
> > With MySQL 4.1 (RHEL4) the columns are:
> >
> > mysql> desc db;
> > 
> +-----------------------+---------------+------+-----+--------
> -+-------+
> > | Field                 | Type          | Null | Key | 
> Default | Extra |
> > 
> +-----------------------+---------------+------+-----+--------
> -+-------+
> > | Host                  | char(60)      |      | PRI |      
>    |       |
> > | Db                    | char(64)      |      | PRI |      
>    |       |
> > | User                  | char(16)      |      | PRI |      
>    |       |
> > | Select_priv           | enum('N','Y') |      |     | N    
>    |       |
> > | Insert_priv           | enum('N','Y') |      |     | N    
>    |       |
> > | Update_priv           | enum('N','Y') |      |     | N    
>    |       |
> > | Delete_priv           | enum('N','Y') |      |     | N    
>    |       |
> > | Create_priv           | enum('N','Y') |      |     | N    
>    |       |
> > | Drop_priv             | enum('N','Y') |      |     | N    
>    |       |
> > | Grant_priv            | enum('N','Y') |      |     | N    
>    |       |
> > | References_priv       | enum('N','Y') |      |     | N    
>    |       |
> > | Index_priv            | enum('N','Y') |      |     | N    
>    |       |
> > | Alter_priv            | enum('N','Y') |      |     | N    
>    |       |
> > | Create_tmp_table_priv | enum('N','Y') |      |     | N    
>    |       |
> > | Lock_tables_priv      | enum('N','Y') |      |     | N    
>    |       |
> > 
> +-----------------------+---------------+------+-----+--------
> -+-------+
> > 15 rows in set (0.00 sec)
> >
> > BTW, isn't there an administrative command that the root 
> user can run to
> > do this task instead of manually touching the MySQL table?
> >
> > Cheers,
> >
> > Bernard 
> >
> >   
> >> -----Original Message-----
> >> From: [EMAIL PROTECTED] 
> >> [mailto:[EMAIL PROTECTED] On Behalf Of 
> >> DongInn Kim
> >> Sent: Friday, May 05, 2006 14:09
> >> To: [email protected]
> >> Subject: Re: [Oscar-users] How to recover from a lost DB ?
> >>
> >> Hi Gareth,
> >>
> >> I am sorry for the late response. Yes, I have got 13 columns.
> >> MySQL that I use is
> >> [EMAIL PROTECTED] ~]$ mysql --version
> >> mysql  Ver 11.18 Distrib 3.23.58, for redhat-linux-gnu (i386)
> >>
> >> So, what version of mysql do you use? What distro do you use?
> >>
> >> But probably you'd better set "Y" on all the *_priv 
> columns except for
> >> "Grant_priv" for the first query (for localhost access).
> >> INSERT INTO db VALUES
> >> 
> ('localhost','oscar','oscar','Y','Y','Y','Y','Y','Y','N','Y','Y','Y');
> >> For % host and oscar user, you'd better set "Y" on
> >> {Select,Insert,Update,Delete}_priv
> >> INSERT INTO db VALUES
> >> ('%','oscar','oscar','Y','Y','Y','Y','N','N','N','N','N','N');
> >> For anonymous user, you should set "Y" on only "Select_priv".
> >> INSERT INTO db VALUES
> >> ('%','oscar','anonymous','Y','N','N','N','N','N','N','N','N','N');
> >>
> >> I don't know what other of the columns would be in your 
> MySQL but I am
> >> sure that you can figure out what value you should put.
> >>
> >> mysql> desc db;
> >> 
> +-----------------+-----------------+------+-----+---------+-------+
> >> | Field           | Type            | Null | Key | Default 
> | Extra |
> >> 
> +-----------------+-----------------+------+-----+---------+-------+
> >> | Host            | char(60) binary |      | PRI |         
> |       |
> >> | Db              | char(64) binary |      | PRI |         
> |       |
> >> | User            | char(16) binary |      | PRI |         
> |       |
> >> | Select_priv     | enum('N','Y')   |      |     | N       
> |       |
> >> | Insert_priv     | enum('N','Y')   |      |     | N       
> |       |
> >> | Update_priv     | enum('N','Y')   |      |     | N       
> |       |
> >> | Delete_priv     | enum('N','Y')   |      |     | N       
> |       |
> >> | Create_priv     | enum('N','Y')   |      |     | N       
> |       |
> >> | Drop_priv       | enum('N','Y')   |      |     | N       
> |       |
> >> | Grant_priv      | enum('N','Y')   |      |     | N       
> |       |
> >> | References_priv | enum('N','Y')   |      |     | N       
> |       |
> >> | Index_priv      | enum('N','Y')   |      |     | N       
> |       |
> >> | Alter_priv      | enum('N','Y')   |      |     | N       
> |       |
> >> 
> +-----------------+-----------------+------+-----+---------+-------+
> >> 13 rows in set (0.00 sec)
> >>
> >> Please let me know if you have any problems with this.
> >>
> >> Regards,
> >>
> >> - DongInn
> >>
> >> gareth wrote:
> >>     
> >>> On Thu 2006-05-04 (11:04), DongInn Kim wrote:
> >>>   
> >>>       
> >>>> OK, now I think I found why you could not really do 
> >>>>         
> >> anything (not select
> >>     
> >>>> query but update/delete thing) on the oscar database.
> >>>> INSERT INTO db VALUES
> >>>>
> >>>>         
> >> 
> ('localhost','oscar','oscar','Y','Y','Y','Y','Y','Y','N','Y','Y','Y');
> >>     
> >>>> INSERT INTO db VALUES
> >>>> ('%','oscar','oscar','Y','Y','Y','Y','N','N','N','N','N','N');
> >>>> INSERT INTO db VALUES
> >>>> 
> ('%','oscar','anonymous','Y','N','N','N','N','N','N','N','N','N');
> >>>> Please run the above queries and see if it works for you.
> >>>>     
> >>>>         
> >>> ah ok.
> >>>
> >>> i assume i run 'use msyql' first. i then get:
> >>>
> >>> mysql> INSERT INTO db VALUES 
> >>>       
> >> 
> ('localhost','oscar','oscar','Y','Y','Y','Y','Y','Y','N','Y','Y','Y');
> >>     
> >>> ERROR 1136 (21S01): Column count doesn't match value 
> count at row 1
> >>>
> >>>
> >>> the db table exists, how do you check it's structure?
> >>>
> >>>
> >>> -------------------------------------------------------
> >>> Using Tomcat but need to do more? Need to support web 
> >>>       
> >> services, security?
> >>     
> >>> Get stuff done quickly with pre-integrated technology to 
> >>>       
> >> make your job easier
> >>     
> >>> Download IBM WebSphere Application Server v.1.0.1 based on 
> >>>       
> >> Apache Geronimo
> >>     
> >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&;
> >> dat=121642
> >>     
> >>> _______________________________________________
> >>> Oscar-users mailing list
> >>> [email protected]
> >>> https://lists.sourceforge.net/lists/listinfo/oscar-users
> >>>   
> >>>       
> >>
> >> -------------------------------------------------------
> >> Using Tomcat but need to do more? Need to support web 
> >> services, security?
> >> Get stuff done quickly with pre-integrated technology to make 
> >> your job easier
> >> Download IBM WebSphere Application Server v.1.0.1 based on 
> >> Apache Geronimo
> >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&;
> >> dat=121642
> >> _______________________________________________
> >> Oscar-users mailing list
> >> [email protected]
> >> https://lists.sourceforge.net/lists/listinfo/oscar-users
> >>
> >>     
> 


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642
_______________________________________________
Oscar-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oscar-users

Reply via email to