Discussion:
mysql_secure_installation
Add Reply
Jude DaShiell
2017-01-28 12:47:27 UTC
Reply
Permalink
Raw Message
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.



--
David C. Rankin
2017-01-29 21:00:12 UTC
Reply
Permalink
Raw Message
Post by Jude DaShiell
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.
Jude DaShiell
2017-01-30 07:09:04 UTC
Reply
Permalink
Raw Message
Thanks for the clarification, at the time of installation there was no
/user/.my.cnf file in existence so this makes sense.
Date: Sun, 29 Jan 2017 16:00:12
Subject: Re: [arch-general] mysql_secure_installation
Post by Jude DaShiell
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.
--

Loading...