i got an error establishing a database connection

Problems with the Windows version of XAMPP, questions, comments, and anything related.

i got an error establishing a database connection

Postby Scheath666 » 13. March 2011 22:31

when i recieve this, it was saying either my WP-config file is incorrect or the database server is down. i don't know what to do next please help!

any suggestions are appreciated
Scheath666
 
Posts: 4
Joined: 13. March 2011 22:20

Re: i got an error establishing a database connection

Postby Altrea » 13. March 2011 23:42

check if your SQL Server is down
check if you can login with your login Data in any mysql admin tool (e.g. phpmyadmin)
check if your wp-config file is correct
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8291
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: i got an error establishing a database connection

Postby xfsgpr » 13. March 2011 23:58

Apart from what Altrea has said, you also need to get these settingsright in your WP-Config file:

Code: Select all
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', 'wordpress');

/** MySQL database username */
define('DB_USER', ' ');

/** MySQL database password */
define('DB_PASSWORD', ' ');

/** MySQL hostname */
define('DB_HOST', 'localhost');


Also make sure you have already created the database wordress before running the setup process.

hth
xfsgpr
 
Posts: 27
Joined: 20. August 2009 21:45

Re: i got an error establishing a database connection

Postby Scheath666 » 14. March 2011 22:53

Ah I c, for the db user it was set to "root" next to it I dunno if that suppose to change and I may have check the mysql as well
Scheath666
 
Posts: 4
Joined: 13. March 2011 22:20

Re: i got an error establishing a database connection

Postby Scheath666 » 15. March 2011 19:00

I have found that mysql server was down and it seem I was able to get t to start again but the problem seem to be the same though.
Scheath666
 
Posts: 4
Joined: 13. March 2011 22:20

Re: i got an error establishing a database connection

Postby Scheath666 » 15. March 2011 21:16

After uninstalling and reinstalling and reach to the point of wordpress login and it asked me to download this install.php file and i dunno what to do with it.

Code: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US" xml:lang="en-US">
<head>
   <title> &rsaquo; Log In</title>
   <meta http-equiv="Content-Type" content="; charset=UTF-8" />
<link rel='stylesheet' id='login-css'  href='http://localhost/wordpress/wp-login.php/wp-admin/css/login.css?ver=20110121' type='text/css' media='all' />
<link rel='stylesheet' id='colors-fresh-css'  href='http://localhost/wordpress/wp-login.php/wp-admin/css/colors-fresh.css?ver=20110121' type='text/css' media='all' />
<meta name='robots' content='noindex,nofollow' />
</head>
<body class="login">
<div id="login"><h1><a href="http://wordpress.org/" title="Powered by WordPress"></a></h1>

<form name="loginform" id="loginform" action="/wp-login.php" method="post">
   <p>
      <label>Username<br />
      <input type="text" name="log" id="user_login" class="input" value="" size="20" tabindex="10" /></label>
   </p>
   <p>
      <label>Password<br />
      <input type="password" name="pwd" id="user_pass" class="input" value="" size="20" tabindex="20" /></label>
   </p>
   <p class="forgetmenot"><label><input name="rememberme" type="checkbox" id="rememberme" value="forever" tabindex="90" /> Remember Me</label></p>
   <p class="submit">
      <input type="submit" name="wp-submit" id="wp-submit" class="button-primary" value="Log In" tabindex="100" />
      <input type="hidden" name="redirect_to" value="/wp-admin/" />
      <input type="hidden" name="testcookie" value="1" />
   </p>
</form>

<p id="nav">
<a href="/wp-login.php?action=lostpassword" title="Password Lost and Found">Lost your password?</a>
</p>
</div>
<p id="backtoblog"><a href="/" title="Are you lost?">&larr; Back to </a></p>

<script type="text/javascript">
function wp_attempt_focus(){
setTimeout( function(){ try{
d = document.getElementById('user_login');
d.focus();
d.select();
} catch(e){}
}, 200);
}

wp_attempt_focus();
if(typeof wpOnload=='function')wpOnload();
</script>
</body>
</html>


because of this, it was creating a loophole, preventing me to log in
Scheath666
 
Posts: 4
Joined: 13. March 2011 22:20


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 46 guests