Skip to main content

set_mysql_password in postwwwacctuser fails

Comments

4 comments

  • tgv
    Thanks Benny, Unfortunately uapi doesn't work either when I try to do things with the default user, similar error messages. Just to clarify, the original idea was to create a user with access to all account databases (before they exist!) to facilitate daily backups. We do that because it's convenient to have a pile of database dumps aside of huge account archives. At first I was auto-creating a user with access to accountname\_% and it kinda worked fine except cPanel interface didn't know how to deal with these users and I had a huge pain mass-migrating accounts. That was years ago, can I ask -- do cPanel GUI, API, migration script etc. support wildcard database names now, in 2016? Then I wanted to make use of the invisible and barely documented default MySQL user, which has access to every database already. The only issue is feeding credentials to the backup script: it can parse .my.cfg file all right but I'm not comfortable leaving account password there, and wanted to change the password to a different one. Still not terribly secure but much better. Apparently this doesn't work through API. I'm wondering if there's a way for the automysqlbackup script to pick credentials the way phpmyadmin does, is it documented anywhere?
    0
  • cPanelMichael
    At first I was auto-creating a user with access to accountname\_% and it kinda worked fine except cPanel interface didn't know how to deal with these users and I had a huge pain mass-migrating accounts. That was years ago, can I ask -- do cPanel GUI, API, migration script etc. support wildcard database names now, in 2016?

    Hello, I don't recommend using a wildcard for database names, however you may find this script helpful for assigning ownership of a database or database username to a cPanel account: /usr/local/cpanel/bin/dbmaptool It's documented at: The dbmaptool script - Documentation - cPanel Documentation This thread may also help: Creating DB, USER, GRANTS and map to an account via SSH Thank you.
    0
  • tgv
    Thanks Michael, I've been using dbmaptool previously in my script, just wanted to move on from it. Sorry I don't know how to express it any clearer: I don't want to create new users, I just want to modify the existing, default one.
    0
  • cPanelMichael
    I'm wondering if there's a way for the automysqlbackup script to pick credentials the way phpmyadmin does, is it documented anywhere?

    Yes, you can make use of the single sign on functionality documented at: Guide to API Authentication - Software Development Kit - cPanel Documentation Thank you.
    0

Please sign in to leave a comment.