---
title: Fixing MySQL settings and SELinux on installs made with an older setup script
description: Fix MySQL settings that revert after a restart (RHEL, CentOS Stream, SUSE) and a 403 on SLES 16 on servers installed with an older SimpleRisk setup script.
---

[Skip to content](https://support.simplerisk.com/kb/fixing-mysql-settings-and-selinux-on-installs-made-with-an-older-setup-script#main-content)

English

Show submenu for translations

[Customer portal](https://support.simplerisk.com/tickets?hsLang=en)

[![SimpleRisk logo of a man walking a tight rope](https://support.simplerisk.com/hs-fs/hubfs/simplerisk_logo_long_small-4.png?width=377&height=72&name=simplerisk_logo_long_small-4.png)](https://www.simplerisk.com/)

Open main navigation

Close main navigation

- English
  
  Show submenu for translations
- [Customer portal](https://support.simplerisk.com/tickets)
- [Contact us](https://www.simplerisk.com/about-us/contact-us)

[Contact us](https://www.simplerisk.com/about-us/contact-us)

 How can we help you?

- There are no suggestions because the search field is empty.

1. [SimpleRisk Knowledge Base](https://support.simplerisk.com/kb?hsLang=en)
2. [Troubleshooting](https://support.simplerisk.com/kb/troubleshooting?hsLang=en)

# Fixing MySQL settings and SELinux on installs made with an older setup script

## Servers installed with the SimpleRisk setup script before 15 November 2026 on Red Hat Enterprise Linux, CentOS Stream, or SUSE can lose MySQL settings after a restart, and SLES 16 servers can return a 403 on every page. This article shows how to check and fix both.

Two problems in the setup script were fixed on 14 and 15 November 2026. Servers installed with an older copy of the script keep the problem until you fix them by hand. Neither affects Ubuntu or Debian, and neither affects a server installed with a current script. If you installed by hand following one of the install guides, the guides already include the fixes.

**Who is affected**

- **MySQL settings:** servers running Red Hat Enterprise Linux, CentOS Stream, SLES, or openSUSE Leap that were installed with the script.
- **SELinux:** servers running SLES 16 that were installed with the script.

Not sure when you installed? Run the checks below. They're safe on any server.

**Fix MySQL's SQL mode and password policy (RHEL, CentOS Stream, SLES, Leap)**

**What goes wrong.** The script saved two MySQL settings (the SQL mode and the password policy) in a file MySQL doesn't read. They worked until the first MySQL restart, such as a reboot or a package update. After that, MySQL went back to its strict defaults. The usual sign is SimpleRisk's application log, */var/log/simplerisk/simplerisk.log*, filling with *Incorrect DATE value: '0000-00-00'* every minute.

**Check.** On the server, as root:

```
my_print_defaults mysqld | grep -E 'sql_mode|validate_password'
```

You should see a --sql\_mode= line. On RHEL and CentOS Stream you should also see the validate\_password lines. If either is missing, continue.

**Fix.** Add the missing settings to */etc/my.cnf*.

On RHEL and CentOS Stream:

```
cat >> /etc/my.cnf <<'EOF'[mysqld]sql_mode=ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTIONloose-validate_password.policy=MEDIUMloose-validate_password.length=20loose-validate_password.mixed_case_count=1loose-validate_password.number_count=1loose-validate_password.special_char_count=0loose-validate_password.check_user_name=ONEOFsystemctl restart mysqld
```

On SLES and openSUSE Leap (the password policy is already in place there, so only the SQL mode is added):

```
cat >> /etc/my.cnf <<'EOF'[mysqld]sql_mode=NO_ENGINE_SUBSTITUTIONEOFsystemctl restart mysql
```

Check the result with the same *my\_print\_defaults* command, and confirm the running server agrees. The root password is in */root/passwords.txt*.

```
mysql -u root -p -e "SELECT @@sql_mode"
```

The old file the script wrote, */etc/my.cnf.d/zz-simplerisk.cnf*, does nothing. You can delete it.

**Fix the 403 on every page (SLES 16)**

**What goes wrong.** SLES 16 turns SELinux on by default. The older script didn't set up SELinux for SimpleRisk, so Apache couldn't read the application and every page returned *403 Forbidden*, even though the installer said it had finished.

**Check.**

```
getenforcels -dZ /var/www/simplerisk /var/log/simpleriskgetsebool httpd_can_network_connect
```

*getenforce* prints *Enforcing*. The directories should show *httpd\_sys\_rw\_content\_t* and *httpd\_log\_t*. The setting should read on. Anything else needs the fix.

**Fix.** Leave SELinux enforcing, and don't turn it off to get past this.

```
semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/simplerisk(/.*)?'semanage fcontext -a -t httpd_log_t '/var/log/simplerisk(/.*)?'restorecon -R /var/www/simplerisk /var/log/simplerisksetsebool -P httpd_can_network_connect=1
```

Reload a page. If you still see an error, look in */var/log/simplerisk/simplerisk.log* for *Database connection failed*, which means the last command didn't take effect.

- [FAQs](https://support.simplerisk.com/kb/faqs?hsLang=en)
- [SimpleRisk Extras](https://support.simplerisk.com/kb/simplerisk-extras?hsLang=en#main-content)

    - [Vulnerability Management Extra](https://support.simplerisk.com/kb/simplerisk-extras?hsLang=en#vulnerability-management-extra)
    - [Team Separation Extra](https://support.simplerisk.com/kb/simplerisk-extras?hsLang=en#team-separation-extra)
    - [Import-Export Extra](https://support.simplerisk.com/kb/simplerisk-extras?hsLang=en#import-export-extra)
- [Administrator Guide](https://support.simplerisk.com/kb/administrator-guide?hsLang=en#main-content)

    - [00 About This Guide](https://support.simplerisk.com/kb/administrator-guide?hsLang=en#00-about-this-guide)
    - [01 Installation and Deployment](https://support.simplerisk.com/kb/administrator-guide?hsLang=en#01-installation-and-deployment)
    - [02 Upgrades and Maintenance](https://support.simplerisk.com/kb/administrator-guide?hsLang=en#02-upgrades-and-maintenance)
    - [03 Users and Permissions](https://support.simplerisk.com/kb/administrator-guide?hsLang=en#03-users-and-permissions)
    - [04 Authentication](https://support.simplerisk.com/kb/administrator-guide?hsLang=en#04-authentication)
    - [05 Customization](https://support.simplerisk.com/kb/administrator-guide?hsLang=en#05-customization)
    - [06 Configuring Risk and Compliance](https://support.simplerisk.com/kb/administrator-guide?hsLang=en#06-configuring-risk-and-compliance)
    - [07 Integrations](https://support.simplerisk.com/kb/administrator-guide?hsLang=en#07-integrations)
    - [08 The API](https://support.simplerisk.com/kb/administrator-guide?hsLang=en#08-the-api)
    - [09 Encryption and Data Security](https://support.simplerisk.com/kb/administrator-guide?hsLang=en#09-encryption-and-data-security)
    - [10 Workflows and Automation](https://support.simplerisk.com/kb/administrator-guide?hsLang=en#10-workflows-and-automation)
    - [11 Reporting and Auditing](https://support.simplerisk.com/kb/administrator-guide?hsLang=en#11-reporting-and-auditing)
    - [12 Operations](https://support.simplerisk.com/kb/administrator-guide?hsLang=en#12-operations)
    - [13 Reference](https://support.simplerisk.com/kb/administrator-guide?hsLang=en#13-reference)
- [User Guide](https://support.simplerisk.com/kb/user-guide?hsLang=en#main-content)

    - [00 Foundations of GRC](https://support.simplerisk.com/kb/user-guide?hsLang=en#00-foundations-of-grc)
    - [01 Risk Management](https://support.simplerisk.com/kb/user-guide?hsLang=en#01-risk-management)
    - [02 Compliance Management](https://support.simplerisk.com/kb/user-guide?hsLang=en#02-compliance-management)
    - [03 Governance](https://support.simplerisk.com/kb/user-guide?hsLang=en#03-governance)
    - [04 Asset and Data Inventory](https://support.simplerisk.com/kb/user-guide?hsLang=en#04-asset-and-data-inventory)
    - [05 Threat and Vulnerability Management](https://support.simplerisk.com/kb/user-guide?hsLang=en#05-threat-and-vulnerability-management)
    - [06 Assessments](https://support.simplerisk.com/kb/user-guide?hsLang=en#06-assessments)
    - [07 Incident Management](https://support.simplerisk.com/kb/user-guide?hsLang=en#07-incident-management)
    - [08 Audit and Reporting](https://support.simplerisk.com/kb/user-guide?hsLang=en#08-audit-and-reporting)
    - [09 Day-to-Day SimpleRisk](https://support.simplerisk.com/kb/user-guide?hsLang=en#09-day-to-day-simplerisk)
    - [10 Continuous Improvement](https://support.simplerisk.com/kb/user-guide?hsLang=en#10-continuous-improvement)
    - [11 Business Continuity and Disaster Recovery](https://support.simplerisk.com/kb/user-guide?hsLang=en#11-business-continuity-and-disaster-recovery)
- [SimpleRisk User Guides](https://support.simplerisk.com/kb/simplerisk-user-guides?hsLang=en)
- [Troubleshooting](https://support.simplerisk.com/kb/troubleshooting?hsLang=en)
- [SimpleRisk Hosted](https://support.simplerisk.com/kb/simplerisk-hosted?hsLang=en)
- [How To videos](https://support.simplerisk.com/kb/how-to-videos?hsLang=en)

[![favicon-1](https://support.simplerisk.com/hs-fs/hubfs/favicon-1.png?width=35&height=35&name=favicon-1.png "favicon-1")](https://www.simplerisk.com)

<https://www.facebook.com/simplerisk/> <https://www.twitter.com/simpleriskfree/> <https://www.linkedin.com/company/simplerisk/>

Copyright © 2026, SimpleRisk, Inc.