b81739df02e5268cc9dc3d9be1de89d4d455f3fb
max
  Thu Mar 3 07:35:28 2022 -0800
supporting mysql 5.5 on centos7 for gbic, refs #28348

diff --git src/product/installer/browserSetup.sh src/product/installer/browserSetup.sh
index b2e1a27..590b84e 100755
--- src/product/installer/browserSetup.sh
+++ src/product/installer/browserSetup.sh
@@ -1279,32 +1279,32 @@
 
     updateBlatServers
     
     echo2
     echo2 "Will now grant permissions to browser database access users:"
     echo2 "User: 'browser', password: 'genome' - full database access permissions"
     echo2 "User: 'readonly', password: 'access' - read only access for CGI binaries"
     echo2 "User: 'readwrite', password: 'update' - readwrite access for hgcentral DB"
     waitKey
     
     #  Full access to all databases for the user 'browser'
     #       This would be for browser developers that need read/write access
     #       to all database tables.  
 
     mysqlVer=`mysql -e 'SHOW VARIABLES LIKE "version";' -NB | cut -f2 | cut -d- -f1 | cut -d. -f-2`
-    if [[ $mysqlVer == "5.6" ]] ; then
-       # centos7 uses mysql 5.6 which doesn't have IF EXISTS so work around that here
+    if [[ $mysqlVer == "5.6" || $mysqlVer == "5.5" ]] ; then
+       # centos7 uses mysql 5.5 or 5.6 which doesn't have IF EXISTS so work around that here
        $MYSQL -e 'DELETE from mysql.user where user="browser" or user="readonly" or user="readwrite" or user="ctdbuser"'
     else
        $MYSQL -e "DROP USER IF EXISTS browser@localhost"
        $MYSQL -e "DROP USER IF EXISTS readonly@localhost"
        $MYSQL -e "DROP USER IF EXISTS ctdbuser@localhost"
        $MYSQL -e "DROP USER IF EXISTS readwrite@localhost"
     fi
 
     $MYSQL -e "FLUSH PRIVILEGES;"
 
     $MYSQL -e "CREATE USER browser@localhost IDENTIFIED BY 'genome'"
     $MYSQL -e "GRANT SELECT, INSERT, UPDATE, DELETE, FILE, "\
 "CREATE, DROP, ALTER, CREATE TEMPORARY TABLES on *.* TO browser@localhost"
     
     # FILE permission for this user to all databases to allow DB table loading with