Cacti.sql : No Such File or Directory

Post support questions that directly relate to Linux/Unix operating systems.

Moderators: Developers, Moderators

krazy1
Posts: 14
Joined: Tue Nov 01, 2005 8:39 am
Location: WI

Cacti.sql : No Such File or Directory

Post by krazy1 »

I am trying to install Cacti onto one of my machines which already had PHP, Apache, and MySQL installed on it. I ran apt-get install cacti and debian got and installed everything it needed. I then started to go through the directions to create the cacti db. I got the DB created but when I did:

mysql cacti < cacti.sql

I get the following:

-bash: cacti.sql: No Such File or Directory

Anyone have any ideas what I am missing or doing wrong? I am a little baffled by this one. I created the DB so why can't it find it?

Thanks in Adv.
User avatar
IMurDOOM
Posts: 24
Joined: Mon Oct 31, 2005 4:17 am
Location: Germany ^^
Contact:

Post by IMurDOOM »

You can try another way to insert the Database.

If you have phpmyadmin you can ran this and
in the database you can insert Database/sql files.

This worked on my PC as well.

EDIT: and your problem: you should change in the cacti directory to insert
that or you can do it this way: mysql cacti < /opt/lampp/htdocs/cacti/cacti.sql
that should work too


IMurDOOM
krazy1
Posts: 14
Joined: Tue Nov 01, 2005 8:39 am
Location: WI

Post by krazy1 »

I also tried creating the DB with PHPMyAdmin and got the same results. I will try your other suggestion and see if I can get that to work. Thanks
User avatar
IMurDOOM
Posts: 24
Joined: Mon Oct 31, 2005 4:17 am
Location: Germany ^^
Contact:

Post by IMurDOOM »

the same result???
PHPmyAdmin has nothing to do with the bash, so you can't get this
error, only an SQL error i mean. For example: "Cannot connect to database" or sth like that

IMurDOOM
krazy1
Posts: 14
Joined: Tue Nov 01, 2005 8:39 am
Location: WI

Post by krazy1 »

I guess what I ment by the same error is I create the DB with PHPMyAdmin and then went to move the cacti.sql by command line and get the same error of it not being able to find it...
User avatar
IMurDOOM
Posts: 24
Joined: Mon Oct 31, 2005 4:17 am
Location: Germany ^^
Contact:

Post by IMurDOOM »

where do you get the error?
On the installation process?

Couldnt connect to database, use passwort YES or sth like that.
I don't know i that solves your problem but configure the config.php
In this file from cacti there were db, user, host and password informations.

IMurDOOM
krazy1
Posts: 14
Joined: Tue Nov 01, 2005 8:39 am
Location: WI

Post by krazy1 »

I tried creating the DB 2 ways, one by Command line and the other through PHPMyAdmin and with both I get an error while doing the following:

mysql cacti < cacti.sql

I get the following:

-bash: cacti.sql: No Such File or Directory


I looked for the config.php for cacti but I don't find it. I know PHP and MYSql work on my server since I already have a website running on it. The issue I am running into is trying to move the Cacti.sql file to the correct folder. I created the DB but Mysql says it does not exits.
User avatar
IMurDOOM
Posts: 24
Joined: Mon Oct 31, 2005 4:17 am
Location: Germany ^^
Contact:

Post by IMurDOOM »

If you inserted the cacti.sql in the database an in the databse
exists tables, around 40-50 than all is okay and you dont have
to run the command you described.

Than you have to open the cacti folder with the browser
and install it.
First configuration is
user: admin
password: admin

IMurDOOM
krazy1
Posts: 14
Joined: Tue Nov 01, 2005 8:39 am
Location: WI

Post by krazy1 »

IMurDOOM wrote:If you inserted the cacti.sql in the database an in the databse
exists tables, around 40-50 than all is okay and you dont have
to run the command you described.

Than you have to open the cacti folder with the browser
and install it.
First configuration is
user: admin
password: admin

IMurDOOM

I am missing something here.... First off if I go to my browser and try to go to Cacti it gives me an error telling me to import cacti.sql into my cacti folder. I am then back to where my trouble is...

mysql cacti < cacti.sql

I get the following:

-bash: cacti.sql: No Such File or Directory

If I go into PHPMyAdmin and look at the Cacti DB it has no tables or anything, it is empty. If I look at the directions online for setting up Cacti in linux step 2 is to create the DB cacti, step 3 is to import it which is where I am having issues. Am I missing somthing here? You are talking about tables being made and the such but I don't see where that happens in the first 3 steps of the directions.
krazy1
Posts: 14
Joined: Tue Nov 01, 2005 8:39 am
Location: WI

Post by krazy1 »

Let me ask this, if I am to have 40-50 tables in the DB how do I create them? I am following the directions on the linux install and there is nothing in there about creating the tables. I am a bit lost here and could use a bit more guidence. Thanks
krazy1
Posts: 14
Joined: Tue Nov 01, 2005 8:39 am
Location: WI

Post by krazy1 »

Ok I have found my answer. I guess Cacti on Debian has a bit more work and thanks to Prefetch for posting this. I had to dig a lot but I found it in his post and now I seem to be on the right track:

I was using: mysql cacti < catci.sql

When I should have been using the following:

zcat /usr/share/doc/cacti/cacti.sql.gz | mysql -u cacti --password=cacti cacti
rfd
Posts: 3
Joined: Mon Nov 21, 2005 11:27 am

Post by rfd »

I have the same problem!

I have Fedora and the same phrase appears:
-bash: cacti.sql: No Such File or Directory

I see the database but i don't even have a cacti.sql file, I did a search and doesn't exists.
elnino
Cacti User
Posts: 205
Joined: Tue Mar 08, 2005 9:51 pm

Post by elnino »

rfd wrote:I have the same problem!

I have Fedora and the same phrase appears:
-bash: cacti.sql: No Such File or Directory

I see the database but i don't even have a cacti.sql file, I did a search and doesn't exists.
The cacti.sql file is in your /var/www/cacti/ directory or wherever you extracted your cacti-0.8.6g.tar.gz file. If you don't see the cacti.sql file, try downloading the tar file again. When you run the mysql command, you'll have to be in your cacti direcotry, or you add the full path before cacti.sql
rfd
Posts: 3
Joined: Mon Nov 21, 2005 11:27 am

Post by rfd »

Thanks, i downloaded a wrong package. With that you said the sql file exists!

I'm doing everthing remotely, but now , when i do "http://IPAddress/cacti", i have the message

Code: Select all

Not Found

The requested URL /cacti was not found on this server.
What could be? I'm a newbie in linux and sql... some configuration in mysql or php? I installed mysql with rmp packages, not as described in the .pdf document in cacti site about how to install it. The machine is already providing a service (something completly different of cacti, is another service) and in the page "http://IPAddress/" we have a webpage with various information, but the error above appears when i do "http://IPAddress/cacti"
elnino
Cacti User
Posts: 205
Joined: Tue Mar 08, 2005 9:51 pm

Post by elnino »

Try accessing the URL with a slash after the directory name, like http://IPAddress/cacti/
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest