DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • December 11, 2017, 05:30:56 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1]   Go Down
  Print  
Author Topic: MYSQL Connect Error  (Read 471 times)
0 Members and 1 Guest are viewing this topic.
Megan|SaraBeth
Mod God
*****
Offline Offline

Posts: 1038



View Profile WWW
« on: October 18, 2017, 11:09:36 AM »

I have searched on here for answers but all pertain to installation. My error is post installation. Every once in awhile when my site goes to process this function in the dbwrapper_mysql.php file I get the following error.


Function processed:
Code:
function db_connect($host,$user,$pass){
$fname = DBTYPE."_connect";
$r = $fname($host,$user,$pass);
return $r;


Error that happens:

Code:
PHP Warning:  mysql_connect(): Access denied for user 'USERNAME'@'localhost' (using password: NO) in /home/USERNAME/public_html/lib/dbwrapper_mysql.php on line 204


Can someone tell my why this happens and where Id look to fix it? Id greatly appreciate it.
« Last Edit: October 20, 2017, 12:09:59 PM by Megan|SaraBeth » Logged

Stephen.Kise
Codemeister
****
Offline Offline

Posts: 378


So meme'd up.


View Profile
« Reply #1 on: October 19, 2017, 10:53:28 AM »

I have searched on here for answers but all pertain to installation. My error is post installation. Every once in awhile when my site goes to process this function in the dbwrapper_mysql.php file I get the following error.


Function processed:
Code:
function db_connect($host,$user,$pass){
$fname = DBTYPE."_connect";
$r = $fname($host,$user,$pass);
return $r;


Error that happens:

Code:
PHP Warning:  mysql_connect(): Access denied for user 'thecomz2'@'localhost' (using password: NO) in /home/thecomz2/public_html/lib/dbwrapper_mysql.php on line 204


Can someone tell my why this happens and where Id look to fix it? Id greatly appreciate it.

It's happening because the argument passed for your $pass (database password) is blank. You can tell from the "access denied for user 'redacted'@'localhost' (using password: NO)" bit, which unfortunately gives away your database username... Not the best of security management there, maybe you should edit your post. Look for any db_connect functions - that's where your issue lies. Since it's 'every once in a while', maybe check items hooked into newday_runonce.
Logged

Slowly progressing fork with PHP 7 support: https://github.com/stephenKise/Legend-of-the-Green-Dragon
Cheap VPS Hosting (10$ credit!): https://m.do.co/c/acde75b086c5
Megan|SaraBeth
Mod God
*****
Offline Offline

Posts: 1038



View Profile WWW
« Reply #2 on: October 20, 2017, 12:35:03 PM »

I edited my post. Now yours just needs to reflect it. I will have a look into this with the information you provided. Thank you!
Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Play LoGD on Dragonprime

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
20 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search