Error 500 in transfer of OJS to another hosting "SQLSTATE[HY000] [1130] Host '127.0.0.1' is not allowed to connect to this MySQL server"

Hi @ojsmk3,

No need to sorry. May be I went to fast. Let’s go step by step.

Sorry if I was not clear: “localhost” and 127.0.0.1 is the same… it won’t be the problem.

BUT, in hosting companies you don’t usually have your DB and code in “localhost”, as @henriqueramos said, they need to give you (in the cpanel or asking the support center) an IP adress for you DB host (as well as a username, DB name and pwd… and sometimes also a port).

This is why I’m asking you to use adminer to do the test. If it fails… is not an OJS issue, and you need to ask to your hosting company.

"I didn’t have access to FTP.

How did you upload your OJS to the host then? If not FTP, you will have SFTP or SSH or a cpanel file explorer. Any of this let you upload the adminer.php file (yes, is a full application in a single file) to your server and do the test I’m asking. Please, visit the post I refer in first place to know more about this.

If you don’t know how to do this, ask your hosting company.
If they don’t want to support you with this, ask them about your DB credentials because I’m almost sure “localhost” is not ok.

About how to anonymize your config.inc.php… just donwload it to your computer, open it with a text editor and replace the password variables (or whatever you feel you don’t like to share) with “xxxx” or what you like. Then, cut&paste to pastebin and place the url in this thread to let us check if something is wrong with your configuration.

After this, please, answer with yes/no (or very briefly) to each of this questions:

  1. Did you clear client cache? Instructions here.
  2. Did you clear your server’s cache? Instructions for clearing server’s data & template cache.
  3. Did you ensure your DB credentials asking your hosting company?
  4. Did you confirm those DB credentials are right with adminer?
  5. Did you upgrade your php version to (at least) 7.2? (I recommend 7.3)
  6. Did you upgrade to last 3.2 stable? (aka. 3.2.1-4 + security patch)

With this feedback we will be able to discover what is really happening.

BTW, leaving the computer now so I won’t be able to read you till tomorrow, but may be others in the forum can help.

Cheers,
m.