WordPress.org

Ready to get started?Download WordPress

Forums

PHP Code for posts
mysql_connect() Access denied for user (3 posts)

  1. Skydras
    Member
    Posted 1 year ago #

    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/

  2. The.Missing.Code
    Member
    Plugin Author

    Posted 1 year ago #

    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

  3. Skydras
    Member
    Posted 1 year ago #

    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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.