mysql host name
Posted by: Chibuzo (---.opera-mini.net)
Date: March 31, 2010 02:33PM

Should mysql hostname be the domain name of my website instead of localhost?

Options: ReplyQuote
Re: mysql host name
Posted by: TheKillerR (---.rdsnet.ro)
Date: March 31, 2010 04:55PM

usually /preferable it should be localhost for what i know
but you may change local host to whatever name you want .. like MYSITE from this directory:
C:\WINDOWS\system32\drivers\etc\hosts

Options: ReplyQuote
Re: mysql host name
Posted by: Chibuzo (---.opera-mini.net)
Date: April 01, 2010 08:53PM

I created some virtualhosts in that file and they work well. So if I decide to connect to mysql from any of the virtualhosts, i'll use the virtualhost name instead of localhost?? E.g mysql_connect('mysite.com', 'username', 'pswd') right?
Thanks

Options: ReplyQuote
Re: mysql host name
Posted by: yfastud (Moderator)
Date: April 01, 2010 10:21PM


Options: ReplyQuote
Re: mysql host name
Posted by: Chibuzo (---.opera-mini.net)
Date: April 02, 2010 03:44PM

Will it work fine when I finally upload it to a hosting server? Thanks

Options: ReplyQuote
Re: mysql host name
Posted by: c2dan (---.15-1.cable.virginmedia.com)
Date: April 02, 2010 04:13PM

It should do, but you may have to change the hostname/username/password your webhost requires when you upload.

Options: ReplyQuote
Re: mysql host name
Posted by: yfastud (Moderator)
Date: April 02, 2010 04:24PM

most live host still use localhost for db server but, as c2dan mentioned, you might have to change that, and for usename and pass, if you setup db acct w/ the same username and pass like in your live host, you dont have to make any change, especially w/ some scripts like wordpress, joomla... you really dont want to modify those if not necessary

to setup db acct, follow this
[blog.jlbn.net]

Have fun,

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

Options: ReplyQuote
Re: mysql host name
Posted by: Chibuzo (---.opera-mini.net)
Date: April 03, 2010 11:26PM

Thanks guys

Options: ReplyQuote
Re: mysql host name
Posted by: ZenProfit (---.cmdnnj.fios.verizon.net)
Date: June 04, 2010 10:32PM

My problem is slightly different.

After 4 years my WAMP 1.5 install became corrupted. So I did an upgrade to WAMP 2.0.
All appeared to have gone well, I could access PHPMyadmin,and see my databases.
However, my website was throwing errors at every link back to the MySQL database:
access denied to "username@ABC123", where ABC123 is the actual name of the server box at my ISP. Before the upgrade, the access was via: username@123.456.78.90 where 123.456.78.90 was the actual DNS of the server (I am the sole user of this server, it is not shared.)

When I went into the MySQL | Users table thru phpMyadmin I manually changed the LocalHost to 123.456.78.90.

Now I cannot access phpMyAdmin at all and the website still cannot access the MySQL database.

What is the process thru the MySQL Console to change the 123.456.78.90 back to ABC123 so I can get back into phpMyAdmin. And then how do I correctly change the username@ setting so my website links will get through to the MySQL database?

Thanks.

Options: ReplyQuote


Sorry, only registered users may post in this forum.