d829dea2e62664b38796d495ca6851fa0c2dfdc3
max
  Mon Oct 14 05:10:52 2024 -0700
changes after code review, refs #34582

diff --git src/hg/lib/sqlProg.c src/hg/lib/sqlProg.c
index 13d146c..320404b 100644
--- src/hg/lib/sqlProg.c
+++ src/hg/lib/sqlProg.c
@@ -124,31 +124,32 @@
 
 safef(path, sizeof path, "%s/my.cnf", getenv("MYSQL_HOME"));
 copyCnfToDefaultsFile(path, defaultFileName, fileNo);
 
 safef(path, sizeof path, "%s/.my.cnf", getenv("HOME"));
 copyCnfToDefaultsFile(path, defaultFileName, fileNo);
 
 /* write out the group name, user, host, and password */
 safef(paddedGroup, sizeof(paddedGroup), "[%s]\n", group);
 if (write (fileNo, paddedGroup, strlen(paddedGroup)) == -1)
     errAbort("Writing group to temporary file %s failed with errno %d", defaultFileName, errno);
 
 char *settings = sqlProfileToMyCnf(profile);
 if (!settings)
     errAbort("Could not connect to MySQL. Profile '%s.*' not found in sqlProfileToMyCnf() -- failed for file '%s' with errno %d. "
-            "Most likely the statements db.host, db.user and db.password as missing in ~/.hg.conf.", profile, defaultFileName, errno);
+            "Most likely the statements %s.host, %s.user and %s.password are missing in ~/.hg.conf or (...)/cgi-bin/hg.conf.", 
+            profile, defaultFileName, errno, profile, profile, profile);
 if (sameString(prog, "mysqldump"))
     {  // need to suppress the database setting, it messes up mysqldump and is not needed. comment it out
     settings = replaceChars(settings, "\ndatabase=", "\n#database=");
     }
 if (write (fileNo, settings, strlen(settings)) == -1)
     errAbort("Writing profile '%s' settings=[%s] as my.cnf format failed for file '%s' failed with errno %d", profile, settings, defaultFileName, errno);
 
 
 return fileNo;
 }
 
 
 void sqlExecProg(char *prog, char **progArgs, int userArgc, char *userArgv[])
 /* Exec one of the sql programs using user and password from ~/.hg.conf.
  * progArgs is NULL-terminate array of program-specific arguments to add,