Database Error! - Programming - Nairaland
Nairaland Forum › Science/Technology › Programming › Database Error! (1281 Views)
| Database Error! by asadul549(op): 7:06pm On Oct 26, 2016*. Modified: 8:22pm On Oct 26, 2016 |
I recently upgraded my server php to 5.6.25 & MySQL to 5.5.49 & from then I'm getting a kind of error like this on specific page. Warning: mysql_query(): Access denied for user 'yury97'@'localhost' (using password: NO) in /home/yury97/public_html/wp-content/themes/Avada/template-member_list.php on line 22 Warning: mysql_query(): A link to the server could not be established in /home/yury97/public_html/wp-content/themes/Avada/template-member_list.php on line 22 Warning: mysqli_fetch_object() expects parameter 1 to be mysqli_result, boolean given in /home/yury97/public_html/wp-content/themes/Avada/template-member_list.php on line 27 I also was exported my database & then delete & created new & then imported on server & set new user & pass on wp-config.php file on wordpress. My database host is now set to localhost. What can be the solution now? Will appreciate your help. Thanks in advance! ![]() |
| Re: Database Error! by Whytelyon(m): 7:24pm On Oct 26, 2016 |
1.) Paste the code, we'll help you. 2.) if you doing this for a big company,i suggest you switch platform and don't use PHP for most industry standard apps anymore. Your code exposed a flaw for Sql injection and it's vulnerable. If a hacker gets foothold of your site, consider yourself a goner,you've lost the contract. |
| Re: Database Error! by asadul549(op): 7:44pm On Oct 26, 2016 |
code form where? From that template where the error is occurring? |
| Re: Database Error! by Whytelyon(m): 8:46pm On Oct 26, 2016 |
asadul549:Your source code that gave that error |
| Re: Database Error! by ANTONINEUTRON(m): 10:39pm On Oct 26, 2016 |
I Might Suggest U Are Using Mysql And Mysqli Together Or Ur Connection Method Is Wrong. Post Ur Code Here (wisely) E Go Easy To See People Wey Go Help U |
| Re: Database Error! by asadul549(op): 6:28pm On Oct 29, 2016*. Modified: 10:04pm On Oct 29, 2016 |
I will appreciate you guys help man. This is template source code where I'm getting error |
| Re: Database Error! by seunex4real: 6:44pm On Oct 29, 2016 |
Kindly use mysqli, you are using MySQL to query and mysqli to get results. MySQL is deprecated Print out the error Using mysqli_error($connection). And the kill the page with die(). Also watch Out for sql injection . Hope it helps. |
| Re: Database Error! by gloryz24: 7:25pm On Oct 29, 2016 |
Looks like you're mixing mysql_ with mysqli_ commands and that won't work. So if you're migrating from mysql_ to mysqli_ the differnece is not just in that one one letter... It's much bigger and you should consult php mysqli documentation: http://php.net/manual/en/book.mysqli.php |
| Re: Database Error! by asadul549(op): 7:41pm On Oct 29, 2016 |
I recently upgraded Mysql from 5.4.something to 5.5.49 |
| Re: Database Error! by asadul549(op): 7:45pm On Oct 29, 2016*. Modified: 10:03pm On Oct 29, 2016 |
I already tried once by replacing mysqli to mysql on that template. But then it says on the page- |
| Re: Database Error! by asadul549(op): 8:00pm On Oct 29, 2016 |
![]() |
Getting Started With Firebase Realtime Database On The Web • Please How Do I Print This Data From MY Database. MYSQL, PHP • 2 • 3 • 4
Free Training • Hackerpost NG Deal: Get Professional Certified Ethical Hacker Online Training • I Need Full Time Developers

