By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,501 Members | 2,817 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,501 IT Pros & Developers. It's quick & easy.

Whole mysql stopped working

matheussousuke
100+
P: 249
A while ago, the website was working, but now, the whole mysql stopped working, I mean, the website oppens, doesnt not show any connection errors, but I can't make any querry.

If I try to login, I get back to the same login form page, if I try to make a query, I get an error inside the website field "Query was empty".


It happened after I had moved the website to a domain folde, I configured everything correct, so I dont know what's going on...




The connection file:

Expand|Select|Wrap|Line Numbers
  1. <?
  2.  
  3.  
  4. //    'server'     'database_username'        'database_password' 
  5. $connection = mysql_connect("localhost", "mcempreg_mcdb", "I wont show it here on the forum")
  6.  or die (mysql_error()); //    'database_name' 
  7.  $db = mysql_select_db("mcempreg_mc", $connection) or die (mysql_error());
  8. ?>

The configuration file:


Expand|Select|Wrap|Line Numbers
  1. <?
  2.  
  3. include ('lang/portuguese.php'); // don't change it
  4. $fullurl = "balcaocerto.com.br";            // dirctory where the system is going to be installed, leave blank for installing on the root
  5. $sitename = "Mister Cursos - Empregos"; // Name of the website
  6.  
  7. $sitenameheading = "Balc„o Certo";
  8.  
  9.  
  10. $sitenamefooter = "Mister Cursos";
  11.  
  12.  
  13. $myemail = "mxxxxxxxxx.com"; // admin e-mail
  14. $contactemail = "mxxxxxxxxxx.com"; // contact e-mail
  15. $mydomain = "balcaocerto.com.br";  // website domain, please don't use http://
  16. $myurl = "balcaocerto.com.br"; // domains where the system is going to be installed, please don't use o http://
  17. $twocoid = ""; // leave it how it is.
  18. $twoco = "disable"; // leave it how it is.
  19. include ('style.php'); // leave it how it is.
  20. ?>
Oct 25 '11 #1
Share this Question
Share on Google+
2 Replies


100+
P: 1,059
you wil have to connect with mysql in every page, and another thing make sure your mysql is running
Oct 26 '11 #2

matheussousuke
100+
P: 249
The connection and configuration file is loaded in every page already.

And the mysql is running.

If I configure the site in a subdomain, it works, but in the domain, just the connection works, not the queries.
Oct 26 '11 #3

Post your reply

Sign in to post your reply or Sign up for a free account.