ROBIN -  Open Source Mesh Network Forum Index ROBIN - Open Source Mesh Network
users community forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

orangemesh.sql - how to import?

 
Post new topic   Reply to topic    ROBIN - Open Source Mesh Network Forum Index -> OrangeMesh Dashboard
View previous topic :: View next topic  
Author Message
Ads






Posted: Wed Aug 23, 2017 12:59 pm    Post subject: Ads

Back to top
orange
User
User


Joined: 04 Nov 2008
Posts: 27
Location: 49.51N, 08.39E

PostPosted: Thu Nov 13, 2008 7:11 am    Post subject: orangemesh.sql - how to import? Reply with quote

Sorry, if this question sounds silly, but I seem to be unable to import the orangemesh.sql into an existing database "orangemesh". I created the user "orangemesh" and the corresponding database. Now if I wanna import the orangemesh.sql into that database, phpmyadmin (or better mysql) complains about the existing database. Honestly I searched for hours, but I'm stuck. Could someone please help me out?
JFYI, I tried to delete the "orangemesh" created in the first step and import then -> that works, but I get a permission error when creating the network. Their must be a way to import the sql into the existing db - I'm just too silly.

BTW, I'm running Ubuntu 8.10 Server + LAMP + OpenSSH

Thanks a lot in advance!

EDIT: I found a howto that recommended deleting the header and import manually. I did so and manged to populate the db now, but the error I encounter remains the same.

Warning: mysqli_connect() [function.mysqli-connect]: (28000/1045): Access denied for user 'orangemesh'@'localhost' (using password: YES) in /var/www/lib/connectDB.php on line 59
Error connecting to database: localhost

Any suggestions? I'm really lost Sad
Back to top
View user's profile Send private message Visit poster's website
orange
User
User


Joined: 04 Nov 2008
Posts: 27
Location: 49.51N, 08.39E

PostPosted: Thu Nov 13, 2008 10:07 pm    Post subject: Reply with quote

Quick update on the happenings...

I gave up with Ubuntu 8.10 and tried to setup LAMP in archlinux. Strange thing is... anything else, but orangemesh works! Next try and approx. 6 hours later I decided to give up with this approach as well and install XAMPP as suggested (in archlinux).

The summary of this try is...
I still cannot create the orangemesh db as described in INSTALL. it complains about "existing db", but pasting the SQL statements works as always and I was able to populate the db. Now, in XAMPP... whenever I try to access
Only registered users can see links on this forum!
Register or Login on forum!

I'll get redirected to
Only registered users can see links on this forum!
Register or Login on forum!


Ok, I thought the reason must be the index.html in XAMPP's default install along with orangemesh's index.php, therefore I moved index.html to index.html.orig (I even deleted it), but still.... guess what? redirect to

Only registered users can see links on this forum!
Register or Login on forum!



hm, honestly I'm in desperate need of help, I'm completely out of ideas, checked everything three times, but I'm unable to get orangemesh running. Could someone please help me? This cannot be that hard to setup!

Thanks in advance!

EDIT:

Only registered users can see links on this forum!
Register or Login on forum!

works (if explicitly entered) I can see the dashboard again (this time in archlinux XAMPP), BUT on ubuntu LAMP, archlinux LAMP and archlinux XAMPP I get...

Warning: mysqli_connect() [function.mysqli-connect]: (28000/1045): Access denied for user 'orangemesh'@'localhost' (using password: YES) in /opt/lampp/htdocs/lib/connectDB.php on line 59
Error connecting to database: localhost

I find no way to get around this Sad
Back to top
View user's profile Send private message Visit poster's website
shasan
Moderator
Moderator


Joined: 16 Feb 2008
Posts: 178
Location: Chapel Hill, NC

PostPosted: Fri Nov 14, 2008 4:36 am    Post subject: Reply with quote

Hey -- sorry for not getting to you earlier. Based on what you've told me I think you should check two things.

First, go to lib/connectDB.php. Make sure that under "database configuration" you've set everything up properly. That's this section:
Code:

$dbHost = "localhost";
$dbUser = "orangemesh";
$dbPass = "default";   //be sure to change this!
$dbName = "orangemesh";


Verify that the $dbUser field matches the username with "all privileges" for the database you created, and that the $dbPass field properly matches the password for that user. When you created the database from phpMyAdmin, you should have selected "Create a database with same name and all privileges". Copying and pasting the orangemesh.sql file in as a SQL query will create your database schema.

If it's really FUBAR then just start over with a fresh XAMPP installation. The easiest thing to do is create your user *precisely* as described in INSTALL, then click on the "SQL" icon on the top left of the phpMyAdmin main screen, and paste the contents of orangemesh.sql there. Doing that should set up your database properly.

The other problem you describe has nothing to do with Orangemesh but is instead a web server configuration issue. I'll talk about the Apache installed with XAMPP here but this should generalize to whatever web server you're using.

Open your Apache httpd.conf file; in XAMPP it's under apache/conf/httpd.conf. Go down to the the DirectoryIndex section; it should look something like this:

Code:


#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
    DirectoryIndex index.php index.php4 index.php3 index.cgi index.pl index.html index.htm index.shtml index.phtml
</IfModule>


Note that "index.php" is in there before "index.html". Add that if it's not there, save it, and restart Apache and you should get index.php to come up. If you're still having trouble with this, I'd encourage you to look for resources about your particular web server; while I'm glad to try to help with your web server configuration my expertise on that matter is limited and you're likely to find more useful help elsewhere.

Ok, try those and let me know what if anything it fixes.

_________________

Only registered users can see links on this forum!
Register or Login on forum!


unc-chapel hill, class of 2010
Back to top
View user's profile Send private message Send e-mail Visit poster's website
orange
User
User


Joined: 04 Nov 2008
Posts: 27
Location: 49.51N, 08.39E

PostPosted: Mon Nov 17, 2008 4:51 pm    Post subject: Reply with quote

Quote:
Hey -- sorry for not getting to you earlier. Based on what you've told me I think you should check two things.

Please, don't worry about it. It's you helping me and I appreciate your help very much.
Quote:
Verify that the $dbUser field matches the username with "all privileges" for the database you created, and that the $dbPass field properly matches the password for that user. When you created the database from phpMyAdmin, you should have selected "Create a database with same name and all privileges". Copying and pasting the orangemesh.sql file in as a SQL query will create your database schema.

If it's really FUBAR then just start over with a fresh XAMPP installation. The easiest thing to do is create your user *precisely* as described in INSTALL, then click on the "SQL" icon on the top left of the phpMyAdmin main screen, and paste the contents of orangemesh.sql there. Doing that should set up your database properly.

To make the long story short. It was all about my limited knowledge about database/server setup and I'm sorry for taking your time. I tried to configure the network from another computer in my LAN as I installed a headless server setup. All I had to do in both my XAMPP and regular LAMP setups was to point $dbHost to the IP address of the server instead of localhost. However I'd like to use the hostname instead but I haven't figured out how to do this without reconfiguring the client's dns table respectively using a local DNS server. If you'd have a sufficient solution for this one I'd be very happy.
As of the orangemesh.sql file I'm not completely sure, but I think your explanation is not 100% correct. Let me explain: If you already created a database "orangemesh" you cannot import neither the sql file, nor paste the whole sql file as a SQL statement, but you need to paste only the statements below "USE `orangemesh`;" - otherwise (in both cases) you'll get an error from mysql about "an already existing database orangemesh". So from my perspective the INSTALL tutorial is not completely correct. Please correct me if I'm wrong though.
Quote:
Note that "index.php" is in there before "index.html". Add that if it's not there, save it, and restart Apache and you should get index.php to come up. If you're still having trouble with this, I'd encourage you to look for resources about your particular web server; while I'm glad to try to help with your web server configuration my expertise on that matter is limited and you're likely to find more useful help elsewhere.

I'll try this, although I personally think that another "configuration mess" in XAMPP must be the issue. As I said I even deleted the stock index.html and nevertheless the redirecting took place to

Only registered users can see links on this forum!
Register or Login on forum!

If I delete the index.html and the index.php remains the only "index file" the redirecting shouldn't take place regardless of the ordering in apache/conf/httpd.conf - I don't know, but at least to me that makes sense.

Anyway, after changing the $dbHost to the local server IP I was able to create the network with both LAMP and XAMPP. I'll use LAMP though due to two reasons: security and updates via the regular package management. Ok, as I said before I try to find a solution to use the server's hostname instead of its IP, but my knowledge prevents me to do so (yet). Any suggestions are certainly welcome.

The last remaining issue I have to face atm is the google-maps API (we already had a discussion about it). I haven't found a way to use the API without a public domain. You know, I don't feel the need to put the dashboard online somewhere just to use it along with a local deployment. I found countless discussion about it while searching around, but no definite solution so far. The API key still seems to be a mess for me... no local network deployment without public domain, the needed registration at google, no commercial usage possible etc.
Anyway, as I said in the other thread I don't want to argue. I appreciate the possibilty to have the deployment under my own control and you guys did a great job with orangemesh. Hopefully I'll find workarounds for the "API mess" - no ideas so far how to solve it though.
Back to top
View user's profile Send private message Visit poster's website
shasan
Moderator
Moderator


Joined: 16 Feb 2008
Posts: 178
Location: Chapel Hill, NC

PostPosted: Mon Nov 17, 2008 5:04 pm    Post subject: Reply with quote

Just a quick reply as I'm in a class right now: for the google maps API, the key is just a hash really. Whatever you write to access in a browser (i.e.,
Only registered users can see links on this forum!
Register or Login on forum!

is what you put as the domain. So if you're using
Only registered users can see links on this forum!
Register or Login on forum!

just put localhost as your domain when you sign up for an API key.

Of course, if you were using local host it would "just work" because the localhost key is included for testing. HTH.

I'll parse the rest of your comment when I get a moment. :) Thanks for your reply!

_________________

Only registered users can see links on this forum!
Register or Login on forum!


unc-chapel hill, class of 2010
Back to top
View user's profile Send private message Send e-mail Visit poster's website
shasan
Moderator
Moderator


Joined: 16 Feb 2008
Posts: 178
Location: Chapel Hill, NC

PostPosted: Tue Nov 18, 2008 4:33 am    Post subject: Reply with quote

For the record, we got this working. Solution documented here for future reference.

To verify if you are having this problem, when you go to the "privileges" section of phpMyAdmin, and select edit for the orangemesh user, you will see something like 'orangemesh'@'%' rather than 'orangemesh'@'localhost'.

Here is the solution. When you go to create a new database user, where it says "Host" (under user name), change that from "any host" to "local". Then do the rest of the instructions in the INSTALL document -- be sure to select "create database with same name and grant all privileges."

That should fix this problem.

_________________

Only registered users can see links on this forum!
Register or Login on forum!


unc-chapel hill, class of 2010
Back to top
View user's profile Send private message Send e-mail Visit poster's website
williamruckman
Moderator
Moderator


Joined: 16 Feb 2008
Posts: 348
Location: Toledo, OH, USA

PostPosted: Sun Dec 28, 2008 12:40 am    Post subject: Reply with quote

I find that it is easiest to import .sql and manage tables in sql using phpmyadmin.

Only registered users can see links on this forum!
Register or Login on forum!


_________________
William Ruckman

Only registered users can see links on this forum!
Register or Login on forum!

Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic    ROBIN - Open Source Mesh Network Forum Index -> OrangeMesh Dashboard All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
c d
e



Powered by phpBB © 2001, 2005 phpBB Group

Abuse - Report Abuse - TOS & Privacy.
Powered by forumup.it free forum, create your free forum! Created by Hyarbor & Qooqoa
Confirmed

Page generation time: 0.106