big problem-pelaese help me . all thing is right

Support requests, bug reports, questions etc.
chirok1987
starter
starter
Posts: 2
Joined: Tue Mar 06, 2012 13:12

big problem-pelaese help me . all thing is right

Post by chirok1987 » Tue Mar 06, 2012 13:25

hi guys. i am beginner in Nconf. but i am expriencer programmer.
i do all things in instalation document and done them rights. after all things done correctly after delet update , install , ... , ... file and directories i back to run nconf
but see this error
"Error

NConf has detected a possible database problem.
Check database connection settings, credentials and permissions.
For system requirements and installation instructions, please refer to the NConf documentation."

i check database tables are create in nconf database. the user set for it is root with all pervillage , InnoDB is correct.
what is the prbolem. pealse tell me.

User avatar
scrat
NConf enthusiast
NConf enthusiast
Posts: 101
Joined: Mon Aug 23, 2010 16:28
Location: Vienna, Austria
Contact:

Re: big problem-pelaese help me . all thing is right

Post by scrat » Tue Mar 06, 2012 18:24

Hi,

Did you receive any error during installation?
Please check mysql.php in you NConf-config directory if the settings for DBHOST, DBNAME, DBUSER and DBPASS are correct.


Regards,
René

chirok1987
starter
starter
Posts: 2
Joined: Tue Mar 06, 2012 13:12

Re: big problem-pelaese help me . all thing is right

Post by chirok1987 » Tue Mar 06, 2012 20:33

tnx for reply.
every thing is ok and a dont recive any error duration installation
:(

robertkoeppl
NConf rookie
NConf rookie
Posts: 19
Joined: Mon Mar 05, 2012 11:01
Location: Leoben Austria

Re: big problem-pelaese help me . all thing is right

Post by robertkoeppl » Wed Mar 07, 2012 09:36

could you post your mysql.php?
Also: it is not wise to use the root account of the DB for anything but administrative tasks - like with the operationg system root user - just my 5 cent

User avatar
agargiulo
NConf developer
NConf developer
Posts: 725
Joined: Fri Mar 06, 2009 17:50
Location: Zurich, Switzerland
Contact:

Re: big problem-pelaese help me . all thing is right

Post by agargiulo » Wed Mar 14, 2012 22:51

is mysql running?

Guest

Re: big problem-pelaese help me . all thing is right

Post by Guest » Tue Apr 10, 2012 04:55

i receiver same problem.


[root@localhost config]# cat mysql.php
<?php
##
## MySQL config
##

#
# Main MySQL connection parameters
#
define('DBHOST', 'localhost');
define('DBNAME', 'nconf');
define('DBUSER', 'nagios');
define('DBPASS', 'nconf');


[root@localhost config]# mysql -u nagios -p nconf
Enter password: (nconf)
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 1623
Server version: 5.1.61 Source distribution

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

Guest

Re: big problem-pelaese help me . all thing is right

Post by Guest » Tue Apr 10, 2012 04:57

[root@localhost config]# ps -ef |grep mysql
root 1543 1 0 02:26 ? 00:00:00 /bin/sh /usr/bin/mysqld_safe --datadir=/var/lib/mysql --socket=/var/lib/mysql/mysql.sock --pid-file=/var/run/mysqld/mysqld.pid --basedir=/usr --user=mysql
mysql 1632 1543 0 02:26 ? 00:00:03 /usr/libexec/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --log-error=/var/log/mysqld.log --pid-file=/var/run/mysqld/mysqld.pid --socket=/var/lib/mysql/mysql.sock
root 15259 1767 0 02:50 pts/1 00:00:00 grep mysql

User avatar
scrat
NConf enthusiast
NConf enthusiast
Posts: 101
Joined: Mon Aug 23, 2010 16:28
Location: Vienna, Austria
Contact:

Re: big problem-pelaese help me . all thing is right

Post by scrat » Tue Apr 10, 2012 11:42

Does your MySQL-User have the following permissions:
SELECT, INSERT, UPDATE, DELETE, CREATE, ALTER, DROP

Regards,
René

Guest

Re: big problem-pelaese help me . all thing is right

Post by Guest » Tue Apr 10, 2012 13:08

mysql -u root -p
Enter password:
mysql> CREATE DATABASE nconf;
mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER ON nconf.* TO 'nagios'@'localhost' IDENTIFIED BY 'nconf';

Yes my user have permission ;)

i make a test and test still ok
<?php
$link = mysql_connect('localhost', 'nagios', 'nconf');
if (!$link) {
die('Conection: FAIL' . mysql_error());
}
echo 'Conection: OK';
mysql_close($link);
?>

User avatar
scrat
NConf enthusiast
NConf enthusiast
Posts: 101
Joined: Mon Aug 23, 2010 16:28
Location: Vienna, Austria
Contact:

Re: big problem-pelaese help me . all thing is right

Post by scrat » Tue Apr 10, 2012 15:43

Are the NConf database and all tables installed?

Code: Select all

mysql> use nconf;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+-----------------+
| Tables_in_nconf |
+-----------------+
| ConfigAttrs     |
| ConfigClasses   |
| ConfigItems     |
| ConfigValues    |
| History         |
| ItemLinks       |
+-----------------+
6 rows in set (0.00 sec)
If not, please install it manually

Code: Select all

mysql -uroot -p nconf < /var/www/nconf/INSTALL/create_database.sql

Regards,
René

Guest

Re: big problem-pelaese help me . all thing is right

Post by Guest » Tue Apr 10, 2012 16:47

Scrat Thanks for try help-me. ;)

folow select in mysql database.

Code: Select all

[root@localhost ~]# mysql -u nagios -p nconf
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2083
Server version: 5.1.61 Source distribution

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
[code]
mysql> show tables
    -> ;
+-----------------+
| Tables_in_nconf |
+-----------------+
| ConfigAttrs     |
| ConfigClasses   |
| ConfigItems     |
| ConfigValues    |
| History         |
| ItemLinks       |
+-----------------+
6 rows in set (0.00 sec)

mysql>

Guest

Re: big problem-pelaese help me . all thing is right

Post by Guest » Wed Apr 11, 2012 13:07

any solution?

User avatar
scrat
NConf enthusiast
NConf enthusiast
Posts: 101
Joined: Mon Aug 23, 2010 16:28
Location: Vienna, Austria
Contact:

Re: big problem-pelaese help me . all thing is right

Post by scrat » Wed Apr 11, 2012 17:48

Hard to say what the problem is...

- Do you use SELinux or AppArmor?
- Is your Apache-User able to read the mysql.php file?

Guest

Re: big problem-pelaese help me . all thing is right

Post by Guest » Wed Apr 11, 2012 18:50

[root@localhost config]# ls -lrt mysql*
-rwxrwxrwx 1 apache apache 185 Apr 10 03:07 mysql.php
[root@localhost config]#

[root@localhost config]# cat /etc/selinux/config |grep SELINUX=
# SELINUX= can take one of these three values:
SELINUX=disabled
[root@localhost config]#


But i dont know see AppArmor.

[root@localhost nconf]# uname -a
Linux localhost.localdomain 2.6.32-220.4.2.el6.i686 #1 SMP Tue Feb 14 00:24:28 GMT 2012 i686 i686 i386 GNU/Linux
[root@localhost nconf]#

could you help me in App armor? i dont know any things to this...

User avatar
scrat
NConf enthusiast
NConf enthusiast
Posts: 101
Joined: Mon Aug 23, 2010 16:28
Location: Vienna, Austria
Contact:

Re: big problem-pelaese help me . all thing is right

Post by scrat » Wed Apr 11, 2012 18:55

AppArmor is used in SuSE and Ubuntu distributions (instead of SELinux)...

Sorry, don't see anything which could be wrong.
Maybe the developers know something...


Regards,
René

Locked