installation – error: failed authorization: incorrect user or incorrect rpc password

After installing Bitcoin on CentOS / AWS, an error occurs when connecting with cli.

$ bitcoind -daemon -conf = /. bitcoin / bitcoin.conf
Starting the Bitcoin server
$ bitcoin-cli getbalance
error: permission failed: incorrect user or rpc password

The following is bitcoin.conf.

mainnet = 1
txindex = 1
server = 1
rest = 1
rpcuser = a
rpcpassword = a
rpcport = 8332