• Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r4wp

[Databases] group to discuss various database issues and drivers

Sujoy
18-Apr-2012
[100x6]
for i 2 length? ieflat 3 [either select i2 ieflat/:i [f: select i2 
ieflat/:i append f (:i - 1)][append i2 ieflat/:i repend i2 reduce 
[to-block (:i - 1)]]]
for i 3 length? ieflat 3 [either select i3 ieflat/:i [f: select i3 
ieflat/:i append f (:i - 2)][append i3 ieflat/:i repend i3 reduce 
[to-block (:i - 2)]]]
rocket: func [s p o it][
    st: now/precise

	while[it > 0][
		s: i1/(:s)
		p: i2/(:p)
		o: i3/(:o)

		res1: intersect s p o
		it: it - 1
	]
	prin join " -> " difference now/precise st
]
...this needs correction of course, to handle s p o combinations, 
but the basic idea is exactly as Terry had worked out
what would be useful is to build something like a SPARQL dialect 
on top of this
anyone interested?
Sunanda
19-Apr-2012
[106]
An associative database would be fun to have in REBOL. The 'map data 
structure in R3 replaces 'hash, and is supposed to be better.

There have been some linkups between REBOL and the relavance associative 
database, but nothing much has come of it.

    http://www.rebol.org/aga-display-posts.r?offset=0&post=r3wp500x1919
    http://www.rebol.net/cgi-bin/r3blog.r?view=0161
    http://www.relavance.com/
Sujoy
19-Apr-2012
[107x2]
Thanks Sunanda - have seen those... have not been able to find the 
video of Ron Everett's talk though. Would be good to see it - would 
you happen to have a link?
I think this would be the start of something superb. If we can build 
a SPARQL like query interface on top of an associative db in rebol, 
we could simply point it to any of the open data initiatives and 
then go on the ride of a lifetime!
Rebolek
19-Apr-2012
[109]
I wouldn't bet on MAP! very much (yet?). While it's very nice concept, 
lot of functionality is missing and what's implemented is buggy. 
OTOH it's nice and pretty fast.
Sujoy
19-Apr-2012
[110x2]
i'm pretty happy with hash! so far...will try map!
am still on R2
? map tells me:
map!            datatype! hash!
map?            action!   Returns TRUE for hash values.

is map! only truly availale on R3?
Endo
19-Apr-2012
[112]
in R2 map! is there just for compability. map! = hash! in R2.

x: make map! [a 1 b 2]
series? x ; == true (for R2)
series? x ; == false (for R3)
Sujoy
19-Apr-2012
[113]
ah! ok...thanks endo
Sunanda
19-Apr-2012
[114]
Sujoy.....Link to Devcon 2007 videos.   Link is below, but you'll 
need a logon to the website. Someone else here will be able to advise 
you on that:

   https://www.prolific.com/quilt.fcgi#files?project=619&folder=2558
Gregg
19-Apr-2012
[115]
http://www.rebol.org/ml-display-message.r?m=rmlZLDJ

Couldn't find an official script for it in rebol.org though.
Sujoy
21-Apr-2012
[116]
thanks for the link Gregg
Arnold
26-Apr-2012
[117]
I want to change some data in a mysql database from a REBOL (2) program 
using DocKimbel's mysql-portocol.r When I use a .r script from my 
website I can connect to the database. I figured that when I ran 
a script from a console I would be able to quickly test my script 
but somehow I am stopped because the script cannot connect. This 
is the error:
** Access Error: Cannot connect to mysql-01.yourname.nl
** Where: open-proto
** Near:
Any ideas?
james_nak
26-Apr-2012
[118]
Arnold, make sure you GRANT privileges to the mysql user before I 
could see it remotely. Make sure you use the '%' parameter or you 
won't see past the localhost. See mysql reference manual for help. 
Also make sure you open the port (3306)
Endo
26-Apr-2012
[119]
You mysql server maybe configured to accept connections only from 
127.0.0.1?
james_nak
26-Apr-2012
[120]
I = you
Endo
26-Apr-2012
[121]
and, try to connect from a remote PC using mysql command-line tool.
james_nak
26-Apr-2012
[122x2]
If you are using Cpanel, there is a section to Grant, otherwise you 
may have to do it manually.
Or in phpMyAdmin, if you have that.
Arnold
26-Apr-2012
[124]
I have the database on my host/provider's site, maybe that is only 
accepting requests by scripts on it's own local address. Could be.

The % parameter? I have http://softinnov.org/rebol/mysql-usage.html#sect12.
for my documentation.
Endo
26-Apr-2012
[125]
% means "accept connection from any IP". It is not related to softinnov's 
mysql driver. If you use phpmyadmin or similar tool to configure 
your mysql, you should see it on GRANT options. You can find more 
info on Mysql Administration documents.
james_nak
26-Apr-2012
[126]
Arnold, I just know enough to get myself connected so these instructions 
might not be too good. As Endo and I are suggesting, perhaps you 
can only accept connections from 127.0.0.1 (localhost). So, you have 
to Grant privileges to the user from your IP. 

Go to http://whatismyipaddress.comand then click on "IP details." 
You will find "Hostname." It is that hostname that you will grant 
privileges to along with the user such as  [user'-:-'hostname]. I imagine 
right now it only accepts [user'-:-'localhost]
Arnold
26-Apr-2012
[127]
I guess my hosting provider is not supporting the GRANT options in 
database user screens and their supplied phpmyadmin. I think I have 
a trick on my sleeve though with a self installed phpmyadmin. No. 
More luck maybe tomorrow....
Endo
26-Apr-2012
[128]
try to get support for that, they can easily do that.
james_nak
26-Apr-2012
[129]
Arnold look for "Prvileges" tab in phpMyadmin. BTW, what type of 
control panel do you have?
Arnold
27-Apr-2012
[130x3]
Hi I found something in the config.inc.php  file and documentation 
that says "$cfg['Servers'][$i]['AllowDeny']['order'] string
If your rule order is empty, then IP authorization is disabled."
There is a Plesk control panel where I can create databases and add 
users/passwords (but no GRANT options) and a webadmin which is a 
PHPMyAdmin screen, that is almost identical to my self installed 
phpMyAdmin 2.6.0-pl2
Most of the time the support of my provider is really good, I'll 
ask them too.
james_nak
28-Apr-2012
[133]
Arnold, so you have the same set-up as I do. Plesk as the main control 
panel and phpadmin (via Plesk and self-installed). It's within phpadmin 
that I am able to grant rights to my host's IP as described above. 
Before this, I had some sites that had cPanel and I did the granting 
from there.
Arnold
28-Apr-2012
[134x3]
James, what phpmydmin version is your self installed phpmyadmin?
I need to upgrade i think.
Upgraded to 3.5, but no privileges for users tab.
Arnold
29-Apr-2012
[137]
Where does open-proto come from in the mysql-protocol.r in the mysql 
driver from softinnov? Word has no value in the version I am using. 
Strange. No complaints when using the script from a location on my 
webspace, trouble when used to connect from my local machine to the 
web MySQL.
Endo
29-Apr-2012
[138]
I still think that it is because your mysql server does not accept 
connections except localhost.

Did you try to connect your database using mysql command-line tools? 
or MySQL Workbench from a remote PC?
ddharing
30-Apr-2012
[139]
What version of mySQL are you using?
Arnold
30-Apr-2012
[140x2]
MySQL 5.0.45, Protocol version 10.
Endo, possible, still I expect the open-proto to be defined somewhere.
james_nak
30-Apr-2012
[142x2]
Arnold, I am using 3.4.5
And when you are in the "Home" Page, do you not have a "priviledges" 
tab?
Arnold
30-Apr-2012
[144]
That is correct. Just Databases, SQL, Status, Export, Import, Settings, 
Synchronize, Variables, Charsets, Engines.
james_nak
30-Apr-2012
[145]
Perhaps you can check the config file and make sure you are logged 
in as the admin.
Arnold
30-Apr-2012
[146]
Possibly the true admin is hidden by the plesk. I hope tomorrow I 
get an answer from my provider. Today is a holiday here, tomorrow 
a working day, just opposite to most of Europe.
Endo
30-Apr-2012
[147]
you can connect from local and configure your server using SQL commands.
did you try TELNET to your server's 3306 port?
Arnold
30-Apr-2012
[148x2]
No, never used TELNET. tried to open a connection to the host. Timed 
out.
Agree with Maxim in the SDK discussion. The app itself was no problem 
but realising the connection to the external database to be managed 
by it is sending me back to TELNET. :)