CodeIgniter error - unable to connect to database using the provided settings

StackOverflow https://stackoverflow.com/questions/23570650

  •  19-07-2023
  •  | 
  •  

Pregunta

I have a CodeIgniter setup that has been running fine for the past 2 months and recently I keep getting:

CodeIgniter error- unable to connect to database using the provided settings

I've recently added a new domain that has a landing page for the database login (zPanel), but I don't see how that could have caused a problem--maybe the page keeps getting directory attacked or something, but I'm not sure.

Is there a way to check if this is the problem through logs? I'm at dead ends with this problem, as when I restart the server (DigitalOcean) it works fine again.

Really not sure. If anyone else has had a similar problem, I'd love to hear your solution.

Thanks.

¿Fue útil?

Solución

I think your mysql is going down so Codeigniter can't connect to your database settings.

Please login to SSH and check processes by "TOP" comment. See what is using resources ram or cpu.

And check your mysql conf settings, be sure that everything written if its empty it will cause alot of problems.

Some example : http://www.maxwhale.com/how-to-optimize-mysql-for-1gb-memory-vps/

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top