2. Where do i set/change "-rpcuser=user -rpcpassword=pass " these credentials?
You don't need to use
-rpcuser and
-rpcpassword (and they're being deprecated)... You can simply use the "cookie" method.
When you run bitcoind, you will find a
.cookie file is created in your Bitcoin data directory (eg. in your ~\.bitcoin directory) with a randomly generated password. The contents of the
.cookie file will look something like this:
__cookie__:a14191e6892facf70686a397b126423
Where:
- "__cookie__" is effectively the
rpcuser value
and "a14191e6892facf70686a397b126423" is the
rpcpassword value
Note: every time bitcoind starts, this file will be regenerated with a new password.
When you run
bitcoin-cli it will automatically look for this
.cookie in the default location and use the credentials stored in there... if you have set bitcoind to use a "custom" data directory (ie.
not ~/.bitcoin), then you can simply invoke bitcoin-cli with the
-datadir option so it can still find the .cookie file.
bitcoin-cli -datadir=/path/to/your/bitcoin/datadir <other commands>
... there are other ways for bitcoin-cli to authenticate without these options, but you don't need to concern yourself with what those are or how they work.
EDIT: or just ignore it all like achow101 says and it will just magically work