Re: mysql_secure_installation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



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.


-- 
David C. Rankin, J.D.,P.E.



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux