$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>error establishing a database connection 3|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

error establishing a database connection 3

matteradmin10PV0评论

This error has already been faced by a lot of people, but I could not find an answer in my case. My wordpress website works perfectly in local

What I have done:

  • Upload with filezila
  • Create a sql database in OVH -Import all the SQL tables from local to the website with phpmyadmin
  • Modify the wp-config.php file and also the wp-config-sample.php writting my informations.

Thanks for your help !!

This error has already been faced by a lot of people, but I could not find an answer in my case. My wordpress website works perfectly in local

What I have done:

  • Upload with filezila
  • Create a sql database in OVH -Import all the SQL tables from local to the website with phpmyadmin
  • Modify the wp-config.php file and also the wp-config-sample.php writting my informations.

Thanks for your help !!

Share Improve this question asked Jan 24, 2019 at 16:32 nolwwwnolwww 1011 bronze badge 14
  • Right now it's a localhost link. Do I need to change with the real website name? – nolwww Commented Jan 24, 2019 at 16:54
  • Just tried to modify siteurl and home in the wp_options with the real website name. But it didn't work. – nolwww Commented Jan 24, 2019 at 17:04
  • Can you change the name wp-config.php and enter the DB credentials in the installation wizard to see if it will connect? Don't finish installation, just check DB connection. – nmr Commented Jan 24, 2019 at 17:15
  • I already modified the wp-config but it didn't work, I get this error. Maybe the localhost is wrong though. The host is OVH. I tried mysql5-21. – nolwww Commented Jan 24, 2019 at 17:18
  • I modified the localhost in wp-config.php , and now, I don't have the same error, but a: 504 gateway time out – nolwww Commented Jan 24, 2019 at 17:39
 |  Show 9 more comments

1 Answer 1

Reset to default 0

I too had faced the same issue many times but after refreshing the browser it solved my problem.

Kindly check the wp-config file and verify if the database name and other information is correct.

Another thing you can try is restarting your local host.

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far