Thanks for the clarification, at the time of installation there was no
/user/.my.cnf file in existence so this makes sense.
On Sun, 29 Jan 2017, David C. Rankin wrote:
Date: Sun, 29 Jan 2017 16:00:12
From: David C. Rankin <drankinatty@xxxxxxxxxxxxxxxxxx>
Reply-To: General Discussion about Arch Linux <arch-general@xxxxxxxxxxxxx>
To: General Discussion about Arch Linux <arch-general@xxxxxxxxxxxxx>
Subject: Re: mysql_secure_installation
On 01/28/2017 06:47 AM, Jude DaShiell wrote:
I now have mariadb installed and working. Another internet site gave an
example /root/.my.cnf file of about 3 lines that has to be read-only and I was
able to do it with that file. The thing is when you hit enter and the error
1045 (28000) error comes up, hit enter again and you go right past that error
successfully and can then do the rest of the script.
I don't know if the /root/.my.cnf file helped or not but I keyed in the
password that was in that file and had it all come up working.
You may be a bit confused about the use of /user/.my.conf. If you invoke mysql
(mariadb) without parameters, then it looks for a .my.conf file under the
current user directory (e.g. /$HOME/.my.cnf). In your .my.conf you simple
enter the mode of operation followed by the password and user, e.g.
$ cat ~/.my.cnf | sed 's/password[ ]=[ ].*$/password = secret/'
[mysqladmin]
password = secret
user = david
[mysql]
password = secret
user = david
[mysqldump]
password = secret
user = david
[mysqlcheck]
password = secret
user = david
The above will allow local operation of 'mysqladmin', 'mysql', 'mysqldump' and
'mysqlcheck' for my user. You can do the same for 'root', but understand it is
for mysql user 'root' that just happened to check '/root/.my.conf' by default
when invoked by root.
--