• Hello

    I use require_once(‘/home/zzz/public_html/database/database.php’);
    to connect to another db.
    But i get an error:
    TEST

    Warning: mysql_connect() [function.mysql-connect]: Access denied for user ‘user’@’localhost’ (using password: YES) in /home/zz/public_html/database/database.php on line 11
    Could not connect to MySQL1:

    If i include thise file from single php – it’s work.
    Where is a problem?

    https://wordpress.org/plugins/php-code-for-posts/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jamie

    (@themissingcode)

    Hi Skydras,

    I don’t think this is a problem with the plugin itself.

    The code entered into the snippet is eval’ed, is it possible for your server to have an alternative php configuration for eval’d code?

    TMC

    Thread Starter Skydras

    (@skydras)

    I found the problem. It is that my hoster or wordpress itself doesn’t allow to connect to db with login whiсh is different than wordpress db login.

    Thanks for helping

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘mysql_connect() Access denied for user’ is closed to new replies.