close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Having connection problems related to password

Thread begun 6/18/2010 7:08 am by gail.bergan407744 | Last modified 6/23/2010 2:19 am by i.edwards384429 | 5462 views | 18 replies |

gail.bergan407744

Having connection problems related to password

Hi,

When going through your How To on updating the database connection file (localhost.php), I set the username and password equivalent to what I have on my server. When I hit Test, it says there is an error connecting to the file. The only way I eliminate the test error is if I enter "root" and "[nothing]" in the u/p fields. But then if I upload this connection file and try to connect to a page (in this case, users_Confirm.php), I get the following error message:

Warning: mysql_pconnect() [function.mysql-pconnect]: Access denied for user 'root'@'localhost' (using password: NO) in /home/gcssepm/www/Connections/localhost.php on line 9

Fatal error: Access denied for user 'root'@'localhost' (using password: NO) in /home/gcssepm/www/Connections/localhost.php on line 9

This has plagued me since Day 1 of following your instructions - If I set a username and password, I cannot connect to the database or mysqladmin. If I set it to nothing, I get a successful connection from within DW CS4 but then cannot connect on the Internet. If you could help me straighten this out it would be greatly appreciated.

Gail

Sign in to reply to this post

Jimmy Wu

It looks like the error from MySql is saying that you have password usage turned off. You would want to contact your service provider or your server admin to see about getting that changed and setting up the correct username and password to access the database.

Sign in to reply to this post

neilo

Hiya Gail,

The WA_talent will be back on Monday.

The database details needed for the URSP will be different for your remote site database than for your local testing-server database.

The UserName will not be 'root' - and the password will either be one that your hosting providers have given you (maybe the same as your control panel) or, if you have set up a new user through your control panel mySql admin area, it will be whatever password you assigned to it there. Similarly, there may be a database already created for you (User name usually the same as your control panel log-in name).

You should start by going to your control panel, and searching around all the options looking for 'mySql' or ''Databases' and see what's there. If you can't find what you need, the next thing would be to contact your hosting providers and ask them where you can find it.

If you find the appropriate area in your control panel and need advice about what to do with it, then do post back here - someone will help further.

Sign in to reply to this post

neilo

Oops sorry Jimmy - (the talent IS here!).

Sign in to reply to this post

Jimmy Wu

Thanks for the help though Neilo. Its always appreciated.

Sign in to reply to this post

gail.bergan407744

Please read carefully:

I have two files in my Connections folder: one you provided "localhost.php" and one that refers to my preexisting database, "GCSMembership.php". I added your Users table to this database, and this is the one I need to ultimately access.

My server has provided me a username and PW to access the GCSMembership database and mysqladmin on their servers, which I have inserted in the proper place in the connections files: username gbergan and PW ******. They are no longer set as "root".

This is the issue: REGARDLESS of whether my php pages point to Connections/localhost.php or Connections/GCSMembership.php (both of which have the same username and pw), I get the same errors when trying to access a sample page, such as users_Login.php or users_Confirm.php:

Warning: mysql_pconnect() [function.mysql-pconnect]: Access denied for user 'root'@'localhost' (using password: NO) in /home/gcssepm/www/Connections/localhost.php on line 9

Fatal error: Access denied for user 'root'@'localhost' (using password: NO) in /home/gcssepm/www/Connections/localhost.php on line 9

They are sending me to you, and you are sending me to them, so I am getting the royal runaround here with no substantive help. Since I purchased this product from you, I expect you to be the greater help. If you need to see any of the files I am referring to, I will be happy to send them to you. PLEASE HELP.

Sign in to reply to this post

neilo

Hello Gail,

No one here is giving you 'the royal runaround" as far as I can tell. You were advised correctly that your hosting providers would be able to help you with your database name, database user name and database username's password. There is no way that anyone here can know that information.

Your posts also are being read carefully.

Regardless of whatever other connection files you have on your server, the URSP pages refer to the localhost.php connection file, so it is this one that we should be concentrating on. You can use the same database as your other connection file (as long as it doesn't already contain a pre-existing 'users' table), and you will use the username and password that your hosting service provided you with.

As your existing membership database has the same user name, user password, and database name - and was presumably connecting OK before you began installation of the URSP (or wasn't it?) - then the information for the localhost.php connection - if entered correctly - should connect OK too.

If you have been following the directions, you will have created a new table in that database (users) using the 'users.sql' sql from the 'Database' folder in your URSP soultion pack.

The two links provided in your post, (www.gcssepm.org/users_LogIn.php & www.gcssepm.org/users_confirm.php) seem to be indicating that the user name in your localhost.php file is still 'root', with no password set. This needs to be checked and corrected if so.

Update your localhost.php file in the Connections folder, check that the info entered into the WA_Globals.php is correct, and upload all the URSP files and folders (maintaining the structure of files and folders) to your remote server. Ensure that the table 'users' exists in your database.

Post back with how you get on.

Edit: I checked back through your other thread with Jason, and notice you have changed some of the require_once calls to point to the other connection file. Please could you replace those pages with fresh original pages that refer to the original connection folder:

<?php require_once('Connections/localhost.php');?>

That way we know where you are. It is also likely that your existing 'membership' connection file uses different variable names to represent the connection details from the ones that URSP uses. Just do the localhost.php file and the globals file and upload the entire contents of the URSP to your remote server. Don't change any paths just now.

Sign in to reply to this post

i.edwards384429

update

Hi

my suggestion would be to go completely back to basics.

Do a backup of your complete exisitng database.

Then install the user registration package as per the WA instructions - which do work-.

Then run the registration package and make sure it all works out of the box.

Once you have proved this you know that the package works and your php mysql setup is compatible.

I'd then re instate your database and check that none of the tables between the two have the same name.

It is then just a question of running the sql statement on your exisitng database and filling in the connections details.

HTH

Ian

Sign in to reply to this post

gail.bergan407744

Thanks

Thanks very much for your detailed reply, this is what I needed. I apologize for my frustration level yesterday, which was very high. I shouldn't have lashed out.

Now to productive matters. Yes the identical "users" table was added to my preexisting table and I did a mysql dump to get the thing imported intact to my server. My first question is, should I have not done this? Should I have instead maintained your Users database as a separate entity and should I delete the duplicate Users table from my membership db? I AM able to connect to my db with no problems using the u/p provided by my hosting service.

The two different connections files have indeed caused some additional confusion - I wasn't sure which one the files should be pointing to. So thanks for clearing that up. They do indeed use different variable names, which my hosting service tech support pointed out, so I thought the issue was that I should instead be pointing to this one.

Every time I have followed the tutorial and tried to set a password for root in my localhost.php file, I do a test and cannot connect, either to mysqladmin (get an error msg in the browser) or through the test button in Dreamweaver. I cannot figure out what is causing this. Will try again. I have followed the tutorial for setting up the globals file and I believe that is set up correctly.

Thanks again for your help; will post back.

I do

Sign in to reply to this post

i.edwards384429

update

Hi

yes it does get really frustrating and it amazes me how much patience Jason and the team have when dealing with php numpties like me.;-)

The database is imaterial to your issue, the users registration only creates one table called users. You can out that table in any database you have and access it by adding connections details in the localhost.php

Ok you may be getting confused with the term local host as that ususally applies to your own machine, it is in fact just a file name it could be connections, xyz or 123456. What is important is that everything that WA do uses the file name local.php to store the connection details. I always create three connection files localhost_local, localhost_remote and localhost.that way I can just overwrite the localhost one when uploading. I also make the connection files read only ( stops the oopppps wish I hadn't done that error).

At the top of everypage the connections localhost.php is called so that should not be an issue once you get the settings right.

If you have two tables called users that may/will cause havoc unless the table structure is identical.

I suggest you give that some thought and come back with more information about the table structure.

HTH

Ian

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...