<pre>

newgrp products

setup upd

bldsunos26% upd install mysql v4_0_5 -f SunOS+5.6 -G "-c" -z /fnal/ups/db

Error:   We had ownership of directory for mysql WRONG.  Needed to be products.
Solution:   Deleted the directory reinstalled

failed to run 'ups declare  mysql v4_0_5 -f SunOS+5.6 -r mysql/v4_0_5/SunOS-5-6 -z /fnal/ups/db -H SunOS+5.6' error output is:
INFORMATIONAL: Product 'mysql' (with qualifiers '*'), has no table file
Specification did not include a -m for table file only default actions will be performed
ERROR: Error in call to fopen: Permission denied
ERROR: Unable to open file /fnal/ups/db/mysql/v4_0_5.version.
upd install failed.

New Warning:
bldsunos26% upd install mysql v4_0_5 -f SunOS+5.6 -G "-c" -z /fnal/ups/db
chgrp: /fnal/ups/prd/mysql/v4_0_5/SunOS-5-6: No such file or directory
chmod: WARNING: can't access /fnal/ups/prd/mysql/v4_0_5/SunOS-5-6
chgrp: /fnal/ups/prd/mysql/v4_0_5/SunOS-5-6/..: No such file or directory
chmod: WARNING: can't access /fnal/ups/prd/mysql/v4_0_5/SunOS-5-6/..
informational: installed mysql v4_0_5.
upd install succeeded.

Reviewing the WARNINGS  abpve   PROD_DIR is WRONG?                      /fnal/ups/db

/fnal/db/mysql
bldsunos26% more v4_0_5.version
FILE = version
PRODUCT = mysql
VERSION = v4_0_5

#*************************************************
#
FLAVOR = SunOS+5.6
QUALIFIERS = ""
  DECLARER = nelly
  DECLARED = 2002-12-30 19.16.46 GMT
  MODIFIER = nelly
  MODIFIED = 2002-12-30 19.16.46 GMT
  PROD_DIR = mysql/v4_0_5/SunOS-5-6

??? Removed table and version file from UPD.......

bldsunos26%  upd install mysql v4_0_5 -f SunOS+5.6 -G "-c" -z /fnal/ups/db
informational: mysql v4_0_5 already exists on local node, skipping.
upd install succeeded.
-------------------------------------------------

 upd install mysql v4_0_5 -f SunOS+5.6 -G "-c"   -z  /afs/fnal.gov/ups/db

This rsh session is using DES encryption for all data transmissions.
Authenticated nelly@FNAL.GOV
vos_release run with args /afs/.fnal.gov/ups/mysql/v4_0_5/SunOS+5.6
Account vosrel: authorization for nelly@FNAL.GOV for execution of
               /usr/krb5/k5arc/scripts/vos_release successful
Changing uid to vosrel (99)
fs: File '/afs/.fnal.gov/ups/mysql/v4_0_5/SunOS+5.6' doesn't exist
VLDB: no such entry
This rsh session is using DES encryption for all data transmissions.
Authenticated nelly@FNAL.GOV
vos_release run with args /afs/.fnal.gov/ups/db
Account vosrel: authorization for nelly@FNAL.GOV for execution of
               /usr/krb5/k5arc/scripts/vos_release successful
Changing uid to vosrel (99)
ups.db                           1685425491 RW      17568 K  On-line
    fsus02.fnal.gov /vicepc
    RWrite 1685425491 ROnly 1685425492 Backup 1685425493
    MaxQuota      20000 K
    Creation    Sun Dec 19 00:40:44 1999
    Last Update Mon Dec 30 13:46:15 2002
    22 accesses in the past day (i.e., vnode references)

    RWrite: 1685425491    ROnly: 1685425492    Backup: 1685425493
    number of sites -> 3
       server fsus02.fnal.gov partition /vicepc RW Site
       server fsus02.fnal.gov partition /vicepc RO Site
       server fsus07.fnal.gov partition /vicepc RO Site
Released volume ups.db successfully
informational: installed mysql v4_0_5.
upd install succeeded.

      ***Did not create products with statement above willtry with
      .fnal.gov

upd install mysql v4_0_5 -f SunOS+5.6 -G "-c"   -z  /fnal.gov/ups/db

===========================

point my products the local db NOT TO AFS  thenI don't need the -z

bldsunos26% setenv PRODUCTS /fnal/ups/db
bldsunos26% echo $PRODUCTS
/fnal/ups/db

bldsunos26% upd install mysql v4_0_5 -f SunOS+5.6 -G "-c"
chgrp: /fnal/ups/prd/mysql/v4_0_5/SunOS-5-6: No such file or directory
chmod: WARNING: can't access /fnal/ups/prd/mysql/v4_0_5/SunOS-5-6
chgrp: /fnal/ups/prd/mysql/v4_0_5/SunOS-5-6/..: No such file or directory
chmod: WARNING: can't access /fnal/ups/prd/mysql/v4_0_5/SunOS-5-6/..
informational: installed mysql v4_0_5.
upd install succeeded.
bldsunos26%

change the grp priveleges

drwxrwxr-x   3 svetlana products    4096 Dec 30 13:27 mysql
<bldsunos26> chmod g+w mysql

reran     ????
                NOOOOOOOOOOOOOOOOOOOOOOO....

bldsunos26% upd install mysql v4_0_5 -f SunOS+5.6 -G -c  -r /fnal/ups/prd/mysql/v4_0_5
informational: mysql v4_0_5 already exists on local node, skipping.
upd install succeeded.
bldsunos26%

*****************************  WORKING COMMAND ONCE WE GOT THE PRODUCT
IN UPD********************************************

setup upd

newgrp products

bldsunos26% upd install mysql v4_0_5 -f SunOS+5.6 -G -c
informational: installed mysql v4_0_5.
upd install succeeded.

*****************************need to tailor the mysql

/afs/fnal.gov/files/home/room3/nelly
bldsunos26% ups tailor mysql
The default mysql data directory = /usr/local/mysql
Is this the place to configure mysql data area (y/n)? n
Please, enter valid path:
/afs/fnal.gov/files/home/room3/nelly
datadir path= /afs/.fnal.gov/files/home/room3/nelly

The default mysql temp directory = /tmp
You can update tmpdir and other mysql server options in mysql configure file:
/afs/.fnal.gov/files/home/room3/nelly/my.cnf before you start mysql server.

Default username for mysqld = mysql.
You can set another username or press Enter to accept default name:

There are small,medium,large or huge cnf files
in /fnal/ups/prd/mysql/v4_0_5/SunOS-5-6/share/mysql directory.
Which one you would like to use (s/m/l/h)?
Please, copy the my-xxxx.cnf (renaming it to my.cnf) to your datadir and repeat ups tailor mysql again

****DIFFERENCE BETWEEN AFS and NON AFS......  need to copy and rerun tailor. ****

          cp /fnal/ups/prd/mysql/v4_0_5/SunOS-5-6/share/mysql/my-medium.cnf my.cnf

              **********started ups tailor again after i have cleared some  space***

                            bldsunos26% ups tailor mysql
The default mysql data directory = /usr/local/mysql
Is this the place to configure mysql data area (y/n)? n
Please, enter valid path:
/afs/fnal.gov/files/home/room3/nelly
datadir path= /afs/.fnal.gov/files/home/room3/nelly

The default mysql temp directory = /tmp
You can update tmpdir and other mysql server options in mysql configure file:
/afs/.fnal.gov/files/home/room3/nelly/my.cnf before you start mysql server.

Default username for mysqld = mysql.
You can set another username or press Enter to accept default name:

There are small,medium,large or huge cnf files
in /fnal/ups/prd/mysql/v4_0_5/SunOS-5-6/share/mysql directory.
Which one you would like to use (s/m/l/h)?  m
You can on/off skip-innodb option in my.cnf file before starting mysqld.
 Disable InnoDB tables now (y/n)? y
Preparing db table
Preparing host table
Preparing user table
Preparing func table
Preparing tables_priv table
Preparing columns_priv table
Installing all prepared tables
021230 15:01:24  /fnal/ups/prd/mysql/v4_0_5/SunOS-5-6/libexec/mysqld: Shutdown Complete

To start mysqld at boot time you have to copy support-files/mysql.server
to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
This is done with:
/fnal/ups/prd/mysql/v4_0_5/SunOS-5-6/bin/mysqladmin -u root password 'new-password'
/fnal/ups/prd/mysql/v4_0_5/SunOS-5-6/bin/mysqladmin -u root -h bldsunos26 password 'new-password'
See the manual for more instructions.

You can start the MySQL daemon with:
cd  /fnal/ups/prd/mysql/v4_0_5/SunOS-5-6; /fnal/ups/prd/mysql/v4_0_5/SunOS-5-6/bin/mysqld_safe &

The latest information about MySQL is available on the web at
http://www.mysql.com
chown: unknown user id .products
chown: unknown user id .products
Mysql server successfuly configured.
upd_volrelease buf
This rsh session is using DES encryption for all data transmissions.
Authenticated nelly@FNAL.GOV
vos_release run with args buf
Account vosrel: authorization for nelly@FNAL.GOV for execution of
               /usr/krb5/k5arc/scripts/vos_release successful
Changing uid to vosrel (99)
VLDB: no such entry
There are following ups function you can use:
To start/stop mysql server      : ups start/stop mysql
To set root password            : ups rootpass mysql
To start mysql client           : ups client mysql
To see server run-time variables: ups variables mysql
To see short status message     : ups status mysql
To ping mysql server            : ups ping mysql

***start the mysql

ERROR:

bldsunos26% ups start mysql
dataInfo=/fnal/ups/db/mysql/config/bldsunos26.

Machine_id=bldsunos26;
Setup:mysql user=/afs/.fnal.gov/files/home/room3/nelly/mysql.sock; datadir = /afs/.fnal.gov/files/home/room3/nelly
bldsunos26% Starting mysqld daemon with databases from /afs/.fnal.gov/files/home/room3/nelly
021230 15:03:31  mysqld ended

INVESTIGATION:   there is a serverlog file to check the in INSTALLERS HOME DIRECTORY
named bldsun026.err.........check file

                                 bldsunos26% more bldsunos26.err
021230 15:03:30  mysqld started
021230 15:03:31  Can't start server: Bind on TCP/IP port: Address already in use
021230 15:03:31  Do you already have another mysqld server running on port: 3306 ?
021230 15:03:31  Aborting

021230 15:03:31  /fnal/ups/prd/mysql/v4_0_5/SunOS-5-6/libexec/mysqld: Shutdown Complete

021230 15:03:31  mysqld ended

TO RESOLVE:

1)  check processes   - i see svetlana has a port... so i will change my port to
default 3306   define another...

mysql.port *installers directory* remove the old port and add new 3307
change my.cnf   all occurences replaced  for client and server    3307
in the db area:  --> /fnal/ups/db/mysql/config   change all occurences to new port

Start again on new port...

         bldsunos26% ups start mysql
dataInfo=/fnal/ups/db/mysql/config/bldsunos26.

Machine_id=bldsunos26;
Setup:mysql user=/afs/.fnal.gov/files/home/room3/nelly/mysql.sock; datadir = /afs/.fnal.gov/files/home/room3/nelly
bldsunos26% Starting mysqld daemon with databases from /afs/.fnal.gov/files/home/room3/nelly

Check the mysql server

bldsunos26% ups ping mysql
dataInfo=/fnal/ups/db/mysql/config/bldsunos26.

Machine_id=bldsunos26;
Setup:mysql user=/afs/.fnal.gov/files/home/room3/nelly/mysql.sock; datadir = /afs/.fnal.gov/files/home/room3/nelly
Ping mysqld:
/fnal/ups/prd/mysql/v4_0_5/SunOS-5-6/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Can't connect to local MySQL server through socket '/afs/.fnal.gov/files/home/room3/nelly/mysql.sock' (95)'
Check that mysqld is running and that the socket: '/afs/.fnal.gov/files/home/room3/nelly/mysql.sock' exists!
Mysql server is not running!!!

Troubleshoot:       CANNOT START A SRV FROM AFS>>>>>>>>>>>>>>>>>>>>>

1) look in home directory for errors hostname.err log file

2) in the ups database  /fnal/ups/db/mysql/config...   change bldsuno26.
this defines what data directory we are using...

3) updated /afs/.fnal.gov/...  to /afs/fnal.gov/.....
   in datadir/mysql.socket
   in datadir/my.cnf
and in /fnal/ups/db/mysql/config/bldsunos26.mysql-servers

Still could not run mysql server; same error:
'Can't connect to local MySQL server through socket '/afs/.fnal.gov/files/home/room3/nelly/mysql.sock' (95)'

But when we changed location to mysql.sock to tmp instead of afs - it did start and works normal.

bldsunos26% ups start mysql
dataInfo=/fnal/ups/db/mysql/config/bldsunos26.

Machine_id=bldsunos26;
Setup:mysql socket=/tmp/mysql.sock; datadir = /afs/fnal.gov/files/home/room3/nelly
bldsunos26% Starting mysqld daemon with databases from /afs/fnal.gov/files/home/room3/nelly

bldsunos26% ups ping mysql
dataInfo=/fnal/ups/db/mysql/config/bldsunos26.

Ping mysqld:
mysqld is alive

********** start mysql client:
*******************************
bldsunos26% ups client mysql
dataInfo=/fnal/ups/db/mysql/config/bldsunos26.

Machine_id=bldsunos26;
Setup:mysql socket=/tmp/mysql.sock; datadir = /afs/fnal.gov/files/home/room3/nelly
Enter your username: mysql
Enter your hostname or press enter to use localhost:
DB name or press enter to skip:
SQL statement to execute or press enter to skip:

Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2 to server version: 4.0.5a-beta

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> use mysql;
ERROR 1044: Access denied for user: '@localhost' to database 'mysql'
mysql> create database test;
ERROR 1007: Can't create database 'test'. Database exists
        Note: No one but only root user is allowed this access to mysql db first;
              Then root user can add other users with different privileges.

mysql> use test;
Database changed
mysql> show tables;
Empty set (0.01 sec)

mysql> create table nelly (id int(3), name varchar(10));
Query OK, 0 rows affected (0.14 sec)

mysql> show tables;
+----------------+
| Tables_in_test |
+----------------+
| nelly          |
+----------------+
1 row in set (0.01 sec)

mysql> exit
Bye
bldsunos26% ups stop mysql
dataInfo=/fnal/ups/db/mysql/config/bldsunos26.

Machine_id=bldsunos26;
Setup:mysql user=/tmp/mysql.sock; datadir = /afs/fnal.gov/files/home/room3/nelly
Enter password:
bldsunos26% 021230 15:54:47  mysqld ended

This is from tmp directory: mysql.sock1 has  srwxrwxrwx
 drwx------   2 nelly    products      69 Dec 30 15:35 test
drwx------   2 nelly    products     846 Dec 30 15:35 mysql
-rw-r--r--   1 nelly    products      17 Dec 30 15:35 mysql.user
-rw-r--r--   1 nelly    products      17 Dec 30 15:35 mysql.socket
-rwxr-xr-x   1 nelly    products    8589 Dec 30 15:35 README
-rw-r--r--   1 nelly    products       5 Dec 30 15:37 mysql.port
-rw-r--r--   1 nelly    products    2716 Dec 30 15:37 my.cnf
srwxrwxrwx   1 nelly    products       0 Dec 30 16:21 mysql.sock1
-rw-rw----   1 nelly    products       5 Dec 30 16:21 bldsunos26.pid
-rw-r--r--   1 nelly    products     890 Dec 30 16:21 bldsunos26.err

This is from afs nelly's directory: mysql.sock1 has  -rwxrwxrwx
 drwx------   2 nelly    products    2048 Dec 30 15:01 mysql
-rwxr-xr-x   1 nelly    products    8589 Dec 30 15:01 README
-rw-r--r--   1 nelly    products       5 Dec 30 15:08 mysql.port
-rw-r--r--   1 nelly    products      48 Dec 30 15:27 mysql.user
drwx------   2 nelly    products    2048 Dec 30 15:54 test
-rw-r--r--   1 nelly    products      49 Dec 30 16:16 mysql.socket
-rw-r--r--   1 nelly    products    2814 Dec 30 16:18 my.cnf
-rwxrwxrwx   1 nelly    products       0 Dec 30 16:18 mysql.sock
-rw-rw----   1 nelly    products       5 Dec 30 16:18 bldsunos26.pid
-rw-r--r--   1 nelly    products    1331 Dec 30 16:18 bldsunos26.err

  
</pre>