[omd-users] Need help with mysql in OMD

Sven Nierlein sven at nierlein.de
Mon Apr 9 08:40:55 CEST 2018


Hi Chris,

1. You could run "bash -x ./etc/init.d/mysql start" to see which command leads to that error.
Besides that, mysql/mariadb behaves just like a normal setup, except the configuration is
in .my.cnf and the process runs as omd site user.

2. There is usually no need to lock down mysql, because thats already down with filesystem
permissions. So unless you want to open mysql to listen to a tcp port, its safe already.

Cheers,
 Sven


On 07.04.2018 02:33, Chris Moody wrote:
> Hello.
>
> I recently started checking out the additional functionality built into OMD and toggled on mysql in the 'omd config <site>' command.
>
> Trouble is, when the site starts/stops, it complains about mysql access not being allowed for 'root'@'localhost'.
>
> ex>
> ==================================
> root at omd1:~# omd start nsight
> Creating temporary filesystem /omd/sites/nsight/tmp...OK
> Starting mkeventd (builtin: syslog-udp,snmptrap)...OK
> Starting gearmand...OK
> Starting influxdb.........OK
> Starting MySQL... .OK.
> *ERROR 1698 (28000): Access denied for user 'root'@'localhost'*
> Starting rrdcached...OK
> Starting Grafana...OK
> Starting gearman_worker...OK
> Starting npcd...OK
> Starting DataScryer...OK
> Starting nagios...OK
> Starting prometheus....OK
> Starting dedicated Apache for site nsight...OK
> Starting Nagflux...OK
> Starting Nagios Service Check Acceptor...OK
> Starting xinetd...OK
> Initializing Crontab...OK
> ==================================
>
> MySQL does start for the site instance, despite the error. 
>
> ==================================
> root at omd1:~# ps aux | grep my
> nsight    8500  0.0  0.1  18252  3092 pts/0    S    17:26   0:00 /bin/bash /usr/bin/mysqld_safe --defaults-file=.my.cnf
> nsight    8643  0.0  1.5 260540 32404 pts/0    Sl   17:26   0:00 /usr/sbin/mysqld --defaults-file=.my.cnf --basedir=/usr --datadir=/omd/sites/nsight/var/mysql --plugin-dir=/usr/lib/mysql/plugin --log-error=/omd/sites/nsight/var/mysql/omd1.node-nine.com.err --pid-file=/omd/sites/nsight/tmp/run/mysqld/mysqld.pid --socket=/omd/sites/nsight/tmp/run/mysqld/mysqld.sock --port=3306
> root      9046  0.0  0.0  14224   976 pts/0    S+   17:26   0:00 grep --color=auto my
> ==================================
>
> And when I specify the socket to connect to via the CLI when I connect to mysql, it allows 'root'@'localhost' in just fine currently without any credentials.
>
> ==================================
> root at omd1:~# mysql -p -u root --socket=/omd/sites/nsight/tmp/run/mysqld/mysqld.sock
> Enter password:  <ENTER>
> Welcome to the MariaDB monitor.  Commands end with ; or \g.
> Your MariaDB connection id is 9
> Server version: 10.0.34-MariaDB-0ubuntu0.16.04.1 Ubuntu 16.04
>
> Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
>
> Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
>
> MariaDB [(none)]>
> ==================================
>
> So two questions:
>
> 1.  What process/params is in need of correction/editing so that the process that's complaining can in fact talk to mysql as needed.
>
> 2.  On that note, when I lock down MySQL to actually require valid credentials, where would I need to specify this in 'omd land' so that OMD plays nicely?
>
>
> Thanks a ton in advance.  This is an incredible bundling of projects!!!
>
> -Chris
>
>
>
> _______________________________________________
> omd-users mailing list
> omd-users at lists.mathias-kettner.de
> http://lists.mathias-kettner.de/mailman/listinfo/omd-users




More information about the omd-users mailing list