Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am trying to get the cacti web interface working. In it's manual from the cacti website, they assume that http://localhost/cacti works, in my case, they assumed wrong. So, i verified that apache is working. I had to install php for cacti to be installed. So my question is: how do i create a new site and how can i tell which is the file that cacti uses with this web browser tool?
I don't know how to set up a new site in apache. I went to the apache.org site, but they explain modules and starting scripts, but not the most simple elemental step as to configure a new site and get it to show in the browser.
well assuming you're running apache as provided by fedora, it was been broken down to enable the use of dropin configuration files. you should have a directory, /etc/httpd/conf.d and in there the cacti install process would have palced a config file specifically for apache to use to provide the necessary configurations. is it there? have you restarted of hup's apache to read the file?
Well, here's the workaround i did. I copied the cacti directory to where apache reads by default, and that fixed that part. But a new issue arised. You know that you have to create a mysql user. So, i performed these steps:
shell> mysql --user=root mysql
mysql> GRANT ALL ON cacti.* TO cactiuser@localhost IDENTIFIED BY 'somepassword';
mysql> flush privileges;
Exactly as they are there so i wouldn't have any problems. But i get this error message:
Code:
Error
You have created a new database, but have not yet imported the 'cacti.sql' file. At the command line, execute the following to continue:
mysql -u cactiuser -p cacti < cacti.sql
This error may also be generated if the cacti database user does not have correct permissions on the cacti database. Please ensure that the cacti database user has the ability to SELECT, INSERT, DELETE, UPDATE, CREATE, ALTER, DROP, INDEX on the cacti database.
I read the error message and verified that i could log in as cactiuser with the password and that i could perform everything with it, and i did from the mysql prompt. What's wrong? I even performed the import again, and typed show tables in the mysql prompt, and saw all the tables there, so i know that the problem is not the importing, it's the user.
Yep i did!!! I can tell cause all the tables in mysql are there. I didn't put them in manually.
So here's the thing: i deleted the database with 'drop database cacti', created the database again with 'create database cacti', and then performed that commmand right there again. Guess what? Same problem. I don't know what's wrong. Jejeje.
Also, please check the commands i used to create the user. Probably the error could be there. But so far i think i did that part right. Since i can connect to the mysql prompt and i can perform everything on the database. Could it be that i need to create a system user too? It doesn't seem so cause in order to connect to the database you just need the user to exist on the database, not on the system. Correct me if i'm wrong. LOL.
I just discovered the most interesting thing. After i type 'grant all on cacti.* to cacti@localhost identified by 'cactiusr';' command, i get a Query OK, 0 rows affected (0.00 sec). So, this kinda made me think if the user was created. So i researched about 'show grants;' and i only get the root grants, but the cactiuser grants are not there, there is only one record!!!!!!! This means that for some reason, the grant statement is not throwing an error, but it is not creating the user either.
What's going on???
Here's the result of the show grants command:
Code:
-> ;
+---------------------------------------------------------------------------------------------------------------+
| Grants for root@localhost |
+---------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' IDENTIFIED BY PASSWORD '1aa2ca6225cef2bb' WITH GRANT OPTION |
+---------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
I dont think there is any problem with the grants (but i dont know much abt mysql).
See if the permissions for the cacti database are set right. If you execute the follow code you should get similar output
Code:
# ls -l /var/db/mysql | grep cacti
drwx------ 2 mysql mysql 4608 Feb 4 16:24 cacti
# ls -l /var/db/mysql/cacti/
total 826
-rw-rw---- 1 mysql mysql 392 Feb 4 16:25 cdef.MYD
-rw-rw---- 1 mysql mysql 2048 Feb 4 16:25 cdef.MYI
-rw-rw---- 1 mysql mysql 8616 Feb 4 16:24 cdef.frm
-rw-rw---- 1 mysql mysql 936 Feb 4 16:25 cdef_items.MYD
-rw-rw---- 1 mysql mysql 3072 Feb 4 16:25 cdef_items.MYI
-rw-rw---- 1 mysql mysql 8722 Feb 4 16:24 cdef_items.frm
...
replace /var/db/mysql with the location where you databases are stored.
I saw that you had mentioned the "flush privileges" in your post. Oops.
1. Make sure you have installed the package php-mysql as well.
2. Make sure you didn't start mysql with --skip-grant-tables (for example if you forgot the root password earlier)
3. In your grant statement I don't see the single quotes around 'cactiuser'@'localhost'. If you forgot those please check your permissions by querying the mysql tables with something like this:
mysql -u root -p
> use mysql;
> select user, host from user;
> select user, db from from db;
Ok, i will try that when i get back to work. I am currently recovering from a motorcycle accident so i'll be away from work at least a week. Thanks for understanding. Believe me when i say that i will be doing those things ASA i get back.
Hey there. I just upgraded mysql to a 5.0 something version. I was following the instructions to give the root password after the installation, but mysqladmin is nowhere to be found. What's going on?
I fixed the mysqladmin thing by installing the client package, but i ran into another problem.
I am trying to perform the following command: mysqladmin --user=root create cacti
And i get the following error: error: 'Access denied for user 'root'@'localhost' (using password: NO)'
I remember doing something to fix this, but i can't remember what. Mysql has just made it so hard for me to get this root user to do things. At first, after installing the rpm, it told me to type 'mysqladmin -u root -p password 'password'' to set the initial password for the mysql root user. But after doing this, the command didn't work. So, i am doing what mysql tells me to do, and then turns back at me laughing as if it just made a prank on me.
Now i tried this to kinda figure out how messed up the password is:
mysqladmin version -p
This displayed the following lines:
mysqladmin Ver 8.41 Distrib 5.0.37, for pc-linux-gnu on i686
Copyright (C) 2000-2006 MySQL AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license
Server version 5.0.37-standard
Protocol version 10
Connection Localhost via UNIX socket
UNIX socket /var/lib/mysql/mysql.sock
Uptime: 2 min 39 sec
Threads: 1 Questions: 1 Slow queries: 0 Opens: 11 Flush tables: 1 Open tables: 6 Queries per second avg: 0.006
I typed the password i've been using, and it did work, so why is the other mysqladmin command telling that the access is denied and that i am not using a password?
After this, i decided mysql is just not a nice program, so i uninstalled mysql server and client packages, and installed them back again. Now, after installing the server and then the client, i typed 'mysqladmin -u root -p password 'newpassword'' to set the password, and then tried to create the cacti database again, and guess what, same error message:'error: 'Access denied for user 'root'@'localhost' (using password: NO)''.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.