Support » Localhost Installs » ERROR 1045 (28000): Access denied for user

  • apb1963

    (@apb1963)



    sudo wp config create –path=/usr/local/src/myhost.mydomain –url=https://myhost.mydomain –dbhost=myhost.mydomain –dbname=myhostDBName –dbuser=”apb@myhost.mydomain” –dbpass=123 –allow-root

    ERROR 1045 (28000): Access denied for user ‘apb@myhost.mydomain’@’localhost’ (using password: YES)

    Can someone explain why it’s tacking on an extra “@localhost”, where it’s coming from and more importantly how to make it not do that?

    Thank you in advance!

    $ wp –info
    PHP binary: /usr/bin/php7.0
    PHP version: 7.0.22-0ubuntu0.16.04.1
    php.ini used: /etc/php/7.0/cli/php.ini
    WP-CLI root dir: phar://wp-cli.phar
    WP-CLI vendor dir: phar://wp-cli.phar/vendor
    WP_CLI phar path: /data/local/src/myscripts
    WP-CLI packages dir: /home/apb/.wp-cli/packages/
    WP-CLI global config:
    WP-CLI project config:
    WP-CLI version: 1.4.0

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator Steve Stern

    (@sterndata)

    Support Volunteer

    try dbuser='apb'@'myhost.mydomain'

    apb1963

    (@apb1963)

    Excellent suggestion! Why mysql syntax didn’t occur to me I’ll never know. Unfortunately it didn’t work. Does it work for you?

    $ sudo wp config create –path=/usr/local/src/myhost.mydomain –url=https://myhost.mydomain –dbhost=myhost.mydomain –dbname=myhostDBName –dbuser=’apb’@’myhost.mydomain’ –dbpass=123 –allow-root

    ERROR 1045 (28000): Access denied for user ‘apb’@’myhost.mydomain’@’localhost’ (using password: YES)

    Moderator Steve Stern

    (@sterndata)

    Support Volunteer

    It’s unclear from https://developer.wordpress.org/cli/commands/config/create/.

    I don’t usually use wp-cli.

    What if you don’t put a host name on dbuser? Will it use the host from dbhost?

    apb1963

    (@apb1963)

    It tacks the @localhost on whether I use a host name or not. I’m calling bug.

    sudo wp config create –path=/usr/local/src/myhost.mydomain –url=https://myhost.mydomain –dbhost=myhost.mydomain –dbname=myhostDBName –dbuser=apb –dbpass=123 –allow-root

    ERROR 1045 (28000): Access denied for user ‘apb’@’localhost’ (using password: YES)

    • This reply was modified 9 months ago by  apb1963.
    Moderator Steve Stern

    (@sterndata)

    Support Volunteer

    add an issue here and see what the devs have to say
    https://github.com/wp-cli/wp-cli/issues

    apb1963

    (@apb1963)

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘ERROR 1045 (28000): Access denied for user’ is closed to new replies.