File:  [LON-CAPA] / doc / Attic / howtoaddusertolonsql
Revision 1.2: download - view: text, annotated - select for diffs
Wed Jun 28 15:45:31 2000 UTC (23 years, 11 months ago) by albertel
Branches: MAIN
CVS tags: version_0_5_1, version_0_5, version_0_4, stable_2002_spring, stable_2002_july, stable_2002_april, stable_2001_fall, STABLE, HEAD
- figured out the exact text to add a user to mysql

    1: start the mysql daemon as /usr/local/bin/safe_mysqld &
    2: Login as root: mysql -u root -p mysql
    3: enter the password as newmysql
    4: add the user www: grant all priveleges on *.* to www@localhost identified by 'newmysql' with grant option;
    5: 
    6: INSERT INTO user (Host, User, Password)
    7: VALUES ('localhost','www',password('newmysql'));
    8: 
    9: GRANT ALL PRIVILEGES ON *.* TO www@localhost;
   10: 
   11: FLUSH PRIVILEGES;
   12: 
   13: Here the user www has the right to grant privileges to other users.
   14: This can be changed if required with a simple update command on the grant tables
   15: 
   16: 
   17: /home/httpd/perl/perlsql/lonsql
   18: /usr/local/mysql/fakeclient
   19: 
   20:  

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>