Error establishing a database connection Amazon EC2 - after moving my wordpress blog

后端 未结 13 1963
無奈伤痛
無奈伤痛 2021-02-01 09:03

I am getting the error: \"error establishing a database connection\" after moving my wordpress blog to Amazon EC2. I\'ve checked the wp-config.php file and settings are ok (loca

13条回答
  •  余生分开走
    2021-02-01 09:43

    I'm not sure which distribution your using so here's how I generally solve these types of issues.
    1. install a program called nmap (it scans ports) 2. run 'nmap localhost' (replace localhost with whichever server is running your database if its not local) 3. check to see if your database(mysql) is running

    If not, then do something to the effect of 'services mysqld restart' (this will restart the mysql daemon). If this fixes it, then look into have that service autostart. If you get an error with that command than you may not have mysql installed.

提交回复
热议问题