robeh
Posts: 17
|
| Posted: 09/30/2005, 2:27 PM |
|
My local setup is running php mysql under sokkit. My pages work fine there. When I upload to the webserver, the login page fails with the error -
Warning: mysql_pconnect(): Access denied for user: 'root@localhost' (Using password: NO) in /home/heymanro/public_html/LeiningSchedule/db_mysql.php on line 99
Database error: pconnect(localhost, , $DBPassword) failed.
MySQL Error: 0 ()
Session halted.
The html and php code and the mysql databases are identical. Any idea of why it fails on the web server, and what I can do to fix it?
Robert
|
 |
 |
Benjamin Krajmalnik
|
| Posted: 09/30/2005, 4:37 PM |
|
Apparently, the root account which you are using for the connection has a
password, and you are not sending one.
Your database structure may very well be identical, but you have to remember
that the credentials for the account accessing the database must be valid.
|
|
|
 |
Damian Hupfeld
|
| Posted: 10/02/2005, 2:38 AM |
|
You are using your LOCAL authentication on your server.
You need to create a user on your hosted account.
On most hosted servers when you do this your username will usually look
like:
hostingaccountname_username
and your database will be
hostingaccountname_dbname
You need to assign rights as well.
Something that I find useful is to setup my LIVE server USERNAME and DATABSE
first and then create exactly the same username and database on the LOCAL
developent server. Its far easier switching between your live and
development servers that way as you are developing and testing your site.
Damian
"robeh" <robeh@forum.codecharge> wrote in message
news:5433dadde10c95@news.codecharge.com...
> My local setup is running php mysql under sokkit. My pages work fine
> there.
> When I upload to the webserver, the login page fails with the error -
>
> Warning: mysql_pconnect(): Access denied for user: 'root@localhost' (Using
> password: NO) in /home/heymanro/public_html/LeiningSchedule/db_mysql.php
> on
> line 99
> Database error: pconnect(localhost, , $DBPassword) failed.
> MySQL Error: 0 ()
> Session halted.
>
> The html and php code and the mysql databases are identical. Any idea of
> why
> it fails on the web server, and what I can do to fix it?
>
> Robert
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
Robert Heyman
|
| Posted: 10/02/2005, 4:20 AM |
|
Yeah, found the problem - had to fill in values in db_mysql.php. But
filling in values for DBUser and DBPassword didn't work - those values
didn't go all the way through. I had to fill in the hard values in line 99
when it tries to connect. Any ideas why?
Robert
|
|
|
 |
Damian Hupfeld
|
| Posted: 10/02/2005, 5:24 AM |
|
Project -> Settings -> Connections ->
You need to complete the Design and Server Tabs at a minimum.
After you complete these I would reccomend that you close CCS, rename your
db_mysql.php file and then republish your application - it shoudl re-create
your db_mysql.php file and fix it properly.
Damian
<RobertHeyman@forum.codecharge (Robert Heyman)> wrote in message
news:5433fc261cf802@news.codecharge.com...
> Yeah, found the problem - had to fill in values in db_mysql.php. But
> filling in values for DBUser and DBPassword didn't work - those values
> didn't go all the way through. I had to fill in the hard values in line
> 99
> when it tries to connect. Any ideas why?
>
> Robert
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>
|
|
|
 |
|