Can't connect to localhost database
Posted by: SuperMario290 (---.ph.ph.cox.net)
Date: March 26, 2010 05:41AM

okay, so here's the story. I have my laptop right not that's running vista home premium, lots of ram and memory and whatnot. My hard drive started to take a crap so I backed everything up took it out, and installed a new one. So I went and reinstalled Wamp 2 (which is brilliant by the way), and everything's working great. Well see I'm mainly a wordpress developer, so I went to install WordPress onto it, and everything goes well (no username or password is what I entered into the installation screen), and it says I can't connect to the database server at localhost.

I never ever had this problem before and I also tried XAMPP but that didn't work as well, so I'm assuming it's not your guys' program. Also I checked the hosts file and it shows:

127.0.0.1 localhost
::1 localhost


so it's now there.

If anybody could help me out I would very much appreciate it.

Thanks,
Keenan P.

Options: ReplyQuote
Re: Can't connect to localhost database
Posted by: stevenmartin99 (---.b-ras2.blp.dublin.eircom.net)
Date: March 26, 2010 05:51PM

delete ::localhost from the file

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Can't connect to localhost database
Posted by: SuperMario290 (---.ph.ph.cox.net)
Date: March 27, 2010 12:44AM

Still doesn't work. The whole code for my hosts file looks like this: [pastebin.com]

Any other ideas?

Options: ReplyQuote
Re: Can't connect to localhost database
Posted by: TheKillerR (---.bucuresti.cablelink.ro)
Date: March 27, 2010 02:47PM

if it looks like that it should work....
be sure that after you removed the
::1 localhost
and saved the file u restarted wamp or your pc

Options: ReplyQuote
Re: Can't connect to localhost database
Posted by: stevenmartin99 (---.b-ras2.blp.dublin.eircom.net)
Date: March 27, 2010 07:12PM

is the wamp icon white?

Steven Martin
stevenmartin99@gmail.com
stevenmartin99@hotmail.com
PampServer.com - [pampserver.com]

Options: ReplyQuote
Re: Can't connect to localhost database
Posted by: SuperMario290 (---.ph.ph.cox.net)
Date: March 28, 2010 07:00AM

Thanks my man, it worked and everything's up and running. Thanks a ton! grinning smiley

Options: ReplyQuote
Re: Can't connect to localhost database
Posted by: mrdanglam (113.161.193.---)
Date: April 01, 2010 05:01AM

me too. while excute index.php display:

set_filenames(array('body'=>'index.tpl')); $template->assign_vars(array( 'LINK_INDEX'=>'index.php?'.$str_sid, 'LINK_NEWS1'=>'news.php?cat=1&'.$str_sid, 'LINK_NEWS2'=>'news.php?cat=2&'.$str_sid, 'LINK_INTRO'=>'general.php?id=1&'.$str_sid, 'LINK_FORUM'=>'forum/', 'LINK_CONTACT'=>'contact.php?'.$str_sid, 'LINK_TTLAMTHE'=>'general.php?id=2&'.$str_sid, 'LINK_LICHPVU'=>'general.php?id=3&'.$str_sid, 'LINK_HETHONG'=>'general.php?id=4&'.$str_sid, 'LINK_MANGLUOI'=>'general.php?id=5&'.$str_sid, 'LINK_BAOCAO'=>'general.php?id=7&'.$str_sid, 'ALT_INDEX'=> 'Trang chủ', 'ALT_NEWS'=> 'Tin Tức', 'ALT_INTRO'=> 'Giới Thiệu', 'ALT_FORUM'=> 'Diễn Đàn', 'ALT_CONTACT'=> 'Liên Hệ', 'WEBSITE_NAME'=>$config['website_name'], 'SID'=>$sid, ) ); $template->pparse('body'); ?>

help me

Options: ReplyQuote
Re: Can't connect to localhost database
Posted by: yfastud (Moderator)
Date: April 01, 2010 05:00PM

mrdanglam, make sure to use full tag <?php ... ?> or enable short tag through wamp tray icon

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Re: Can't connect to localhost database
Posted by: mrdanglam (113.161.193.---)
Date: April 02, 2010 03:26AM

yfastud Wrote:
-------------------------------------------------------
> mrdanglam, make sure to use full tag <?php ... ?>
> or enable short tag through wamp tray icon

yes, but error
[localhost] -> [localhost]

show error:

Request-URI Too Large

The requested URL's length exceeds the capacity limit for this server.

please help me

Options: ReplyQuote
Re: Can't connect to localhost database
Posted by: yfastud (Moderator)
Date: April 02, 2010 04:09PM

mrdanglam, seems like you directly run or simply copy the script from your live host which causes the issue, so make sure you have to install that script on wamp then export data and db from live host and import them into that script in wamp

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote


Sorry, only registered users may post in this forum.