Jump to content

can someone solve this ?


powerpower1

Recommended Posts

my script is not connecting to my database, i get this error

 

Warning: mysql() [function.mysql]: Access denied for user 'apache'@'localhost' (using password: NO)

 

when i installed the script it did build the info in the database, but its not connecting to it when you run the script......please keep in mined that the script is encoded, so i cant change the code, this script works perfect on other peoples websites, im just the only one having a problem, but why is it going to use 'apache'@'localhost' .....it should use root.....any idea how to fix it ?

Link to comment
Share on other sites

but why is it going to use 'apache'@'localhost' .....it should use root.....any idea how to fix it ?

 

That is the default username / host php will attempt to use if you have not defined otherwise. I suggest you define your connection settings.

Link to comment
Share on other sites

There are a few directives relating to mysql's default values.... look for....

 

; Default port number for mysql_connect().  If unset, mysql_connect() will use
; the $MYSQL_TCP_PORT or the mysql-tcp entry in /etc/services or the
mysql.default_port =
mysql.default_socket =
; Default host for mysql_connect() (doesn't apply in safe mode).
mysql.default_host =
; Default user for mysql_connect() (doesn't apply in safe mode).
mysql.default_user =
; Default password for mysql_connect() (doesn't apply in safe mode).
; *Any* user with PHP access can run 'echo get_cfg_var("mysql.default_password")
mysql.default_password =

Link to comment
Share on other sites

<xml>

<section name="DATABASE CONFIGURATION">

<field type="select" name="db_type" text="Select your database type">MySQL<enum val="MySQL">1</enum>

</field>

<field required="1" type="edit" name="db_host" text="Your database host (it may be an IP address)">localhost</field>

<field required="1" type="edit" name="db_login" text="Your database username">DATABASE NAME</field>

<field type="edit" name="db_pswd" text="Your database password">PASSWORD</field>

<field required="1" type="edit" name="db_name" text="Database name">USER NAME</field>

</xml>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.