|
|
| Author |
Message |
ottob Cacti User
Joined: 27 Apr 2004 Posts: 50 Location: Duesseldorf, Germany
|
Posted: Tue Jan 18, 2005 8:55 am Post subject: The MySQL Graph Collection - Version 2.0! |
|
|
Hi all out there,
its time for an upgrade of the mysql-graph collection. Read the README file inside the zip-archive for more information.
changelog:
- added MySQL traffic graph
- only one php-script file for easier upgrades
- improved colors
- fixes some issues due php installation etc.
have fun!
otto
| Description: |
|
| Filesize: |
71.22 KB |
| Viewed: |
86197 Time(s) |

|
| Description: |
| contains all files needed |
|
 Download |
| Filename: |
mysql_stats.zip |
| Filesize: |
24.72 KB |
| Downloaded: |
14706 Time(s) |
|
|
| Back to top |
|
 |
fmangeant Cacti Guru User
Joined: 19 Sep 2003 Posts: 2326 Location: Sophia-Antipolis, France
|
Posted: Tue Jan 18, 2005 11:37 am Post subject: |
|
|
Many many thanks
I've just modified the data templates to check "Use Per-Data Source Value" for "Database Host", allowing me to graph my local MySQL server on 127.0.0.1
Regards,
Frédéric
|
|
| Back to top |
|
 |
BSOD2600 Cacti Moderator
Joined: 08 May 2004 Posts: 8821 Location: WA, USA
|
Posted: Tue Jan 18, 2005 6:45 pm Post subject: |
|
|
Looks like a great script, but I'm getting an error:
C:\>php -q c:\www\cacti\scripts\mysql_stats.php localhost cactiuser@localhost cactipw Connections
Error: MySQL connect failed. Check MySQL parameters (host/login/password)
I've tried several combos of the cactiuser@localhost, my computer name, IP addy, etc. all which don't work.
I've granted cactiuser PROCESS rights via phpmyadmin
What am I missing?
|
|
| Back to top |
|
 |
ottob Cacti User
Joined: 27 Apr 2004 Posts: 50 Location: Duesseldorf, Germany
|
Posted: Wed Jan 19, 2005 2:18 am Post subject: |
|
|
Hi,
try to use only "cactiuser" (not "cactiuser@localhost") as database user...
in any case there must be a problem with the mysql-rights.
otto
|
|
| Back to top |
|
 |
fmangeant Cacti Guru User
Joined: 19 Sep 2003 Posts: 2326 Location: Sophia-Antipolis, France
|
Posted: Wed Jan 19, 2005 3:11 am Post subject: |
|
|
Hi
by default (at least on my Gentoo Linux installation) MySQL binds to localhost only ; I have this in /etc/mysql/my.cnf :
| Code: | # keep secure by default!
bind-address = 127.0.0.1 |
Have you tried to query your loopback IP address ?
|
|
| Back to top |
|
 |
BSOD2600 Cacti Moderator
Joined: 08 May 2004 Posts: 8821 Location: WA, USA
|
Posted: Wed Jan 19, 2005 12:03 pm Post subject: |
|
|
| ottob wrote: | try to use only "cactiuser" (not "cactiuser@localhost") as database user... in any case there must be a problem with the mysql-rights.
otto |
I've tried that too with the same result.
How else can I check the rights? Wouldn't Phpmyadmin work?
|
|
| Back to top |
|
 |
ottob Cacti User
Joined: 27 Apr 2004 Posts: 50 Location: Duesseldorf, Germany
|
Posted: Wed Jan 19, 2005 12:26 pm Post subject: |
|
|
hi,
phpmyadmin is no problem, but after setting the rights in the mysql tables you must use the mysql-command "flush privileges;" or restart the server to apply the right changes...
have you used the "grant" command as described in the readme, or the phpmyadmin built-in right functions?
please post the cactiuser entry in your mysql.user table...
|
|
| Back to top |
|
 |
pbulteel Cacti User
Joined: 05 Sep 2003 Posts: 150 Location: London
|
Posted: Wed Jan 19, 2005 12:44 pm Post subject: |
|
|
I had the same problem... if I ran it with 127.0.0.1 it failed, but when I ran it with localhost it passed.
I think you need to set the permissions in mysql to be user@'localhost' and another one with user@'127.0.0.1' for it to work... since it probably depends on the Host name you are monitoring.
-P
|
|
| Back to top |
|
 |
BSOD2600 Cacti Moderator
Joined: 08 May 2004 Posts: 8821 Location: WA, USA
|
Posted: Wed Jan 19, 2005 5:16 pm Post subject: |
|
|
That is what phpmyadmin shows. Is there something missing for cactiuser?
This is what I got when I tried the grant thing on my cacti/mysql machine:
| Code: |
mysql> GRANT PROCESS ON * TO cactiuser@'localhost' IDENTIFIED by 'cactipw';
ERROR 1045: Access denied for user: '@localhost' (Using password: NO)
mysql> GRANT PROCESS ON * TO cactiuser' IDENTIFIED by 'cactipw';
'>
'>
'> ?
'> help
'> exit
'> Aborted
|
What the heck is with the '> prompt where I can't seemingly do anything?
|
|
| Back to top |
|
 |
fmangeant Cacti Guru User
Joined: 19 Sep 2003 Posts: 2326 Location: Sophia-Antipolis, France
|
Posted: Thu Jan 20, 2005 2:33 am Post subject: |
|
|
Here are the installation instructions (http://www.cacti.net/downloads/docs/html/install_unix.html) :
| Code: | shell> mysql --user=root mysql
mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'somepassword';
mysql> flush privileges; |
Could you try to rerun these commands ?
|
|
| Back to top |
|
 |
pbulteel Cacti User
Joined: 05 Sep 2003 Posts: 150 Location: London
|
Posted: Thu Jan 20, 2005 7:13 am Post subject: |
|
|
| BSOD2600 wrote: |
This is what I got when I tried the grant thing on my cacti/mysql machine:
| Code: |
mysql> GRANT PROCESS ON * TO cactiuser@'localhost' IDENTIFIED by 'cactipw';
ERROR 1045: Access denied for user: '@localhost' (Using password: NO)
mysql> GRANT PROCESS ON * TO cactiuser' IDENTIFIED by 'cactipw';
'>
'>
'> ?
'> help
'> exit
'> Aborted
|
What the heck is with the '> prompt where I can't seemingly do anything? |
The problem was with yur sql. You have TO cactiuser' IDENTIFIED when you needed TO 'cactiuser' IDENTIFIED - i.e. missing a ' .
Try adding another user 'catiuser'@'127.0.0.1' with the same password as your otherone...
That worked for me.
-P
|
|
| Back to top |
|
 |
BSOD2600 Cacti Moderator
Joined: 08 May 2004 Posts: 8821 Location: WA, USA
|
Posted: Thu Jan 20, 2005 10:39 am Post subject: |
|
|
| Code: |
mysql> GRANT ALL ON cacti.* TO 'cactiuser@127.0.0.1' IDENTIFIED BY 'cactipw';
ERROR 1044: Access denied for user: '@localhost' to database 'cacti'
mysql> GRANT PROCESS ON * TO 'cactiuser' IDENTIFIED by 'cactipw';
ERROR 1045: Access denied for user: '@localhost' (Using password: NO)
mysql> GRANT PROCESS ON * TO 'cactiuser@127.0.0.1' IDENTIFIED by 'cactipw';
ERROR 1045: Access denied for user: '@localhost' (Using password: NO)
|
Would someone please show me what their Cacti user looks like with PHPmyadmin? Obviously, there is something not right.
|
|
| Back to top |
|
 |
ottob Cacti User
Joined: 27 Apr 2004 Posts: 50 Location: Duesseldorf, Germany
|
Posted: Thu Jan 20, 2005 11:01 am Post subject: |
|
|
| looks like you dont have root access to mysql... is it your own machine?
|
|
| Back to top |
|
 |
pbulteel Cacti User
Joined: 05 Sep 2003 Posts: 150 Location: London
|
Posted: Thu Jan 20, 2005 11:31 am Post subject: |
|
|
| BSOD2600 wrote: | | Code: |
mysql> GRANT ALL ON cacti.* TO 'cactiuser@127.0.0.1' IDENTIFIED BY 'cactipw';
ERROR 1044: Access denied for user: '@localhost' to database 'cacti'
mysql> GRANT PROCESS ON * TO 'cactiuser' IDENTIFIED by 'cactipw';
ERROR 1045: Access denied for user: '@localhost' (Using password: NO)
mysql> GRANT PROCESS ON * TO 'cactiuser@127.0.0.1' IDENTIFIED by 'cactipw';
ERROR 1045: Access denied for user: '@localhost' (Using password: NO)
|
Would someone please show me what their Cacti user looks like with PHPmyadmin? Obviously, there is something not right. |
How did you log into mysql?
You should have done it as root.
mysql -u root -p mysql
then get prompted for password....
This is the mysql root user password not the system root password... it should be the same as the user/password that you use in phpmyadmin to be able to add the user to the system in the first place. Now the thin is, in phpmyadmin - add a user cactiuser with the host of 127.0.0.1 ... grant process rights to that user and voila!
Maybe it's more complicated than that, but at least give it a try.
-P
|
|
| Back to top |
|
 |
BSOD2600 Cacti Moderator
Joined: 08 May 2004 Posts: 8821 Location: WA, USA
|
Posted: Thu Jan 20, 2005 2:46 pm Post subject: |
|
|
Yes, I own this mysql machine
| Code: |
C:\mysql\bin>mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8837 to server version: 4.0.21-nt
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> GRANT PROCESS ON * TO 'cactiuser@127.0.0.1' IDENTIFIED by 'cactipw';
ERROR 1145: The host or user argument to GRANT is too long
mysql> GRANT PROCESS ON * TO 'cactiuser@localhost' IDENTIFIED by 'cactipw';
ERROR 1145: The host or user argument to GRANT is too long
mysql> GRANT PROCESS ON * TO 'cactiuser' IDENTIFIED by 'cactipw';
Query OK, 0 rows affected (0.01 sec)
mysql> exit
C:\mysql\bin>php -q c:\auntie\cacti\scripts\mysql_stats.php localhost cactiuser cactipw Connections
Error: MySQL connect failed. Check MySQL parameters (host/login/password)
C:\mysql\bin>php -q c:\auntie\cacti\scripts\mysql_stats.php command localhost cactiuser cactipw
change_db:5553 delete:54254 insert:55861 select:231182 update:11474
C:\mysql\bin>
|
Amazing, no one caught my mistakes this whole time with the wrong command to run the script...sheesh
|
|
| Back to top |
|
 |
|