URL: https://www.opennet.ru/cgi-bin/openforum/vsluhboard.cgi
Форум: vsluhforumID1
Нить номер: 75844
[ Назад ]

Исходное сообщение
"My SQL нужна помощь"

Отправлено prostak , 23-Авг-07 21:45 
нужно реализовать вот это в командной строке  Linux:

Before you start using the NDO utilities, you should create the database where
you will be storing all Nagios-related information.

NOTE:  As of 02/12/2006, only MySQL databases are supported.  PostgreSQL support
      will likely be added in the future.


1.  Create a database for storing the data (e.g. 'nagios')

2.  Create a username/password that has at least the following privileges for
    the database:

       SELECT, INSERT, UPDATE, DELETE

3.  Run the DB installation script in the db/ subdirectory of the NDO distribution
    to create the necessary tables in the database.

       cd db
       ./installdb

4.  Make sure the database name, prefix, and username/password you just created
    and setup match the variable specified in the NDO2DB config file (see below).

не могу понять как это будит выглядить правильно в командах!

Содержание

Сообщения в этом обсуждении
"My SQL нужна помощь"
Отправлено eax0r , 24-Авг-07 11:57 
>[оверквотинг удален]
>
>       cd db
>       ./installdb
>
>4.  Make sure the database name, prefix, and username/password you just
>created
>    and setup match the variable specified in the
>NDO2DB config file (see below).
>
>не могу понять как это будит выглядить правильно в командах!

1. Создать БД
# mysql --user=root -p
mysql>CREATE DATABASE nagios;
mysql>use mysql;
mysql>INSERT INTO user (host,user,password) VALUES ('localhost','nagios_user',password('nagios_user_pass');
mysql>quit // а может и не надо. но на всякий случай =)
# mysqladmin --user=root -p reload

2.
# mysql --user=root -p
mysql>GRANT SELECT,INSERT,UPDATE,DELETE on nagios.* TO nagios_user@localhost WITH GRANT OPTION;
mysql>quit
# mysqladmin --user=root -p reload

3.
# cd db
# ./installdb

4. Убедиться, что все хорошо

Дальше хуже будет. Такое надо знать.