Knowledgebase article 153

Restart MySQL in Linux (for 404 error after system restart)


By default, after restarting a Linux computer, MySQL does not start automatically.  Tomcat will not display the eHD webpage if it is unable to communicate with your database, resulting in a 404 error.

Linux (for customers who have used our installer version 9.1 and higher):

We have included a script to start the mySQL service.

1.  At the comand line (as root) run:
service GLmysql start

2.  Restart tomcat.  At the command line (as root) run:
service GLtomcat restart

If you would like the MySQL service to start automatically with Linux, please create a link to this script in the correct runlevel directory (default is 5, if you don't know what runlevel you're using please create a link in 3, 4 and 5).

1.  At the terminal, navigate to /etc/init.d
2.  enter "ls GL* to make sure you have the GLtomcat and GLmysql startup scripts
3.  Type the following command to make a link in the corresponding runlevel directory:

ln -s /etc/init.d/GLtomcat /etc/init.d/rc5.d/S20GLtomcat
ln -s /etc/init.d/GLmysql /etc/init.d/rc5.d/S19GLmysql

Note: You may need to adjust your paths to match the correct runlevel directory.

 
Linux (for customers who have not used our installer version 9.0.5 and lower):
 
If you have instllaed from a repository, you may be able to start it at the terminal (as root)run:
rcmysql start
 
If you have installed your own version of mySQL from another source it is necessary for you locate the installation directory of mySQL and create your own script.
 
1.  Locate the mySQL installation directory
Run the following and see if the directory apperas
ps aux | grep mySQL
ps aux | grep tomcat

2.  From a Terminal (as root), run:
${installer:sys.installationDir}/mysql/bin/mysqld_safe 

passing it these arguments:
 
--defaults-file=${installer:sys.installationDir}/mysql/my.cnf
 
--user=GLmysql
 
--basedir=${installer:sys.installationDir}/mysql
 
--datadir=${installer:sys.installationDir}/mysql/data
 
--ledir=${installer:sys.installationDir}/mysql/bin

Also, put an ampersand (&) at the end to run this process in the background.

Example (with default installation in /opt/GroupLink/everything_HelpDesk/):

/opt/GroupLink/everything_HelpDesk/mysql/bin/mysqld_safe --defaults-file=/opt/GroupLink/everything_HelpDesk/mysql/my.cnf --user=GLmysql --basedir=/opt/GroupLink/everything_HelpDesk/mysql --datadir=/opt/GroupLink/everything_HelpDesk/mysql/data --ledir=/opt/GroupLink/everything_HelpDesk/mysql/bin &
 
3.  After you have started the mySQL service please restart the tomcat service.
Group eHD Standard Support Last modified Nov 13, 2019 Type Public Viewed 4477