After importing a WP site (I’m troubleshooting on Local and the import otherwise looks good), I need to create a mysql user for the wp access. While I have done this sort of thing before, it wasn’t with Local. The wp site originates at Dreamhost, if that matters.
I can see the failure upon first access on the web:
Warning : mysqli::__construct(): (HY000/1045): Access denied for user
remainder including user and IP / network server deleted.
I can do this with Admirer or shell commands. Just walk me thru it!
It sounds like this is what you need. We have details in here for creating or updating users via CLI:
Thanks, that does work for the wp mysql db. However, I was not seeing the problem correctly, which is one a 2nd mysql db. I have a 2nd db which is used by the wp site, with it’s own plugin that connects up. I can import that 2nd db using adminer, but I can’t seem to get a mysql user for that connection. The shell with the wp command isn’t quite it. Nor can I seem to get it to work with sql commands in adminer. How can I create and set a password for another mysql db? TIA --Dirk
To clarify you’re saying that you have two databases for this single site and you need a user for the 2nd database? Is this some kind of multisite install or what’s the purpose of the 2nd DB?
The 2nd db is outside of wp, in php, and used for bed & breakfast listings. Right now I have it all in Joomla and I want to change to WP (for long term reasons). https://uurehome.com is the current site.
In that case something like this article from WPBeginner might give you some better pointers:
Thanks for pointing these techniques out, Nick. I have already been messing around in straight SQL and am getting stuck at the point of adding privs using GRANT. It appears that you all have turned on SKIP-NAME-RESOLVE in mysql, at least for Macs, and that’s inhibited several commands that would add privs. Sigh, thought it would be simple to set this in in LOCAL (having done things like this over the years in MAMP/WAMP and even roll-my-own). But now, I am thinking I should just stick with pounding on it with FTP and remote ssh shells on dreamhost.
You can close this issue, as I can tell you all don’t have a ready made approach for a 2nd mysql db. Thanks again for getting back to me…