Forums
This topic is locked
Can't connect to MySQL db even after the new tutor
Posted 15 Oct 2004 21:20:26
1
has voted
15 Oct 2004 21:20:26 Chris Kieff posted:
I purchased the DMX tutorial "Setting up a PHP Site & MySQL Connection in Dreamweaver MX"Nice tutorial but... I still can't connect.
I keep getting: "401 Not Authorized" errors.
Here's my cPanel screen:
MySQL Account Maintenance
Databases: treecity_example
Users in example
treecity_ (Privileges: ALL PRIVILEGES)
Connection Strings
Perl $dbh = DBI->connect("DBI:mysql:treecity_example:localhost","treecity_","<PASSWORD HERE>"
PHP $dbh=mysql_connect ("localhost", "treecity_", "<PASSWORD HERE>" or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("treecity_example"
Db:
Users: treecity_
UserName:
Password:
Access Hosts: localhost
Host (% wildcard is allowed):
phpMyAdmin
You can use phpMyAdmin to administrate your MySQL databases in a web based environment.
--
Chip Off the O'l Proc
Thats 'cessor not 'tology
www.1GoodReason.Com
Chris Kieff
Replies
Replied 29 Oct 2004 10:56:40
29 Oct 2004 10:56:40 Janusz Jasinski replied:
Ahhh,
if it's going to be one of those cPanel jobs then it's not going to be the standard way of connecting. It will depend on what you have in: Local Info, remote Info and Testing Server. I've done this a few time but can't remember off the top of my head. You basically have to set connections to be on the server then treat it all as if you were on the server if that makes sense? You have to set it to localhost.... think that you are on the server rather than being a client.
I realise that doesn't make much sense so I'll try and clarify!
You gotta get used to thinking like a server not a client. This website: paul.ecommerce.hct.ac.ae/tutorials/dwmx-php/dwmxphp.htm pretty much explains it but it takes agfes to downlaod due to the screengrabs.
Hope that helps!
Yup - janusz.co.uk
if it's going to be one of those cPanel jobs then it's not going to be the standard way of connecting. It will depend on what you have in: Local Info, remote Info and Testing Server. I've done this a few time but can't remember off the top of my head. You basically have to set connections to be on the server then treat it all as if you were on the server if that makes sense? You have to set it to localhost.... think that you are on the server rather than being a client.
I realise that doesn't make much sense so I'll try and clarify!
You gotta get used to thinking like a server not a client. This website: paul.ecommerce.hct.ac.ae/tutorials/dwmx-php/dwmxphp.htm pretty much explains it but it takes agfes to downlaod due to the screengrabs.
Hope that helps!
Yup - janusz.co.uk