Can't see the database
Moderators: Developers, Moderators
Can't see the database
I have followed the instructions to to a "T" but for some reason I'm still getting:
Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'.
When following the instructions I get no errors and the database is setup and working fine, but I cant' get passed this. Any clues where I should look? here is a copy of what I'm doing.
#################### SQL
mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'passwd';
Query OK, 0 rows affected (0.01 sec)
########################
#################### config.php
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "passwd";
#############################
#################### Databases
mysql> show databases;
+----------+
| Database |
+----------+
| cacti |
| mysql |
| test |
+----------+
3 rows in set (0.00 sec)
#############################
Cannot connect to MySQL server on 'localhost'. Please make sure you have specified a valid MySQL database name in 'include/config.php'.
When following the instructions I get no errors and the database is setup and working fine, but I cant' get passed this. Any clues where I should look? here is a copy of what I'm doing.
#################### SQL
mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'passwd';
Query OK, 0 rows affected (0.01 sec)
########################
#################### config.php
$database_type = "mysql";
$database_default = "cacti";
$database_hostname = "localhost";
$database_username = "cactiuser";
$database_password = "passwd";
#############################
#################### Databases
mysql> show databases;
+----------+
| Database |
+----------+
| cacti |
| mysql |
| test |
+----------+
3 rows in set (0.00 sec)
#############################
Just a little more information that I'm currently researching. This is what my logs says.
Sep 2 13:09:46 samara kernel: audit(1125688186.880:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:46 samara kernel: audit(1125688186.982:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:47 samara kernel: audit(1125688187.085:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:47 samara kernel: audit(1125688187.188:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:47 samara kernel: audit(1125688187.290:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:47 samara kernel: audit(1125688187.392:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:47 samara kernel: audit(1125688187.494:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:47 samara kernel: audit(1125688187.596:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:47 samara kernel: audit(1125688187.699:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:47 samara kernel: audit(1125688187.800:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:47 samara kernel: audit(1125688187.902:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:48 samara kernel: audit(1125688188.004:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:48 samara kernel: audit(1125688188.106:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:48 samara kernel: audit(1125688188.208:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:48 samara kernel: audit(1125688188.310:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:48 samara kernel: audit(1125688188.412:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:48 samara kernel: audit(1125688188.514:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:48 samara kernel: audit(1125688188.617:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:48 samara kernel: audit(1125688188.719:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:48 samara kernel: audit(1125688188.821:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:46 samara kernel: audit(1125688186.880:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:46 samara kernel: audit(1125688186.982:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:47 samara kernel: audit(1125688187.085:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:47 samara kernel: audit(1125688187.188:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:47 samara kernel: audit(1125688187.290:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:47 samara kernel: audit(1125688187.392:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:47 samara kernel: audit(1125688187.494:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:47 samara kernel: audit(1125688187.596:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:47 samara kernel: audit(1125688187.699:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:47 samara kernel: audit(1125688187.800:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:47 samara kernel: audit(1125688187.902:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:48 samara kernel: audit(1125688188.004:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:48 samara kernel: audit(1125688188.106:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:48 samara kernel: audit(1125688188.208:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:48 samara kernel: audit(1125688188.310:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:48 samara kernel: audit(1125688188.412:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:48 samara kernel: audit(1125688188.514:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:48 samara kernel: audit(1125688188.617:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:48 samara kernel: audit(1125688188.719:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
Sep 2 13:09:48 samara kernel: audit(1125688188.821:0): avc: denied { write } for pid=11654 exe=/usr/sbin/httpd name=mysql.sock dev=dm-0 ino=1217267 scontext=root:system_r:httpd_t tcontext=root:object_r:var_lib_t tclass=sock_file
I'm sorry... I did do that. I was just posting the information that I do have. I did run the "mysql> flush privileges;" command.
What I did now is upgrading all my RPM's to see if that will fix me.
This is what I've upgraded to:
rrdtool-1.0.50-1.1.fc3.rf
mysql-server-3.23.58-16.FC3.1
mysql-3.23.58-16.FC3.1
php-4.3.11-2.7
So I'm running the correct version...
What I did now is upgrading all my RPM's to see if that will fix me.
This is what I've upgraded to:
rrdtool-1.0.50-1.1.fc3.rf
mysql-server-3.23.58-16.FC3.1
mysql-3.23.58-16.FC3.1
php-4.3.11-2.7
So I'm running the correct version...
Last edited by mijohnst on Fri Sep 02, 2005 2:39 pm, edited 1 time in total.
Okay, I found something on the web with someone having the same problem that I'm having with FC3. Sorry for all the posts and I hope this helps someone that had the problem that I did.
To Fix the problem you have to go into your security level tool and under the SELinux you need to click on Transaction and make sure that "Disable Selinux protection for httpd " is checked. Then you have to reboot... Fixed!
To Fix the problem you have to go into your security level tool and under the SELinux you need to click on Transaction and make sure that "Disable Selinux protection for httpd " is checked. Then you have to reboot... Fixed!
- rony
- Developer/Forum Admin
- Posts: 6022
- Joined: Mon Nov 17, 2003 6:35 pm
- Location: Michigan, USA
- Contact:
Yep, I was going to post that it was SELinux, but you figured it out.
[size=117][i][b]Tony Roman[/b][/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
[size=84][i]Experience is what causes a person to make new mistakes instead of old ones.[/i][/size]
[size=84][i]There are only 3 way to complete a project: Good, Fast or Cheap, pick two.[/i][/size]
[size=84][i]With age comes wisdom, what you choose to do with it determines whether or not you are wise.[/i][/size]
Who is online
Users browsing this forum: No registered users and 2 guests