Koozali.org: home of the SME Server

owncloud contrib mysql issue

Offline ghorst352

  • ****
  • 180
  • +0/-0
owncloud contrib mysql issue
« on: January 28, 2013, 05:43:01 PM »
I have tried getting the owncloud contrib to work however I cannot get past the following mysql commands:

myUser="put owncloud-admin usernamehere"
myPass="put password here"
mysql --execute="create database owncloud"
mysql --execute="grant all privileges on owncloud.* to $myUser@localhost identified by $myPass"
mysql --execute="flush privileges"

When I try to execute the 4th line "mysql --execute="grant all privileges on owncloud.* to $myUser@localhost identified by $myPass" I get the following error message:

ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0wncl0ud4m32' at line 1

I am using SME Version 8.0 and followed the documentation word for word so I don't know what I am missing here?

Reference: http://wiki.contribs.org/OwnCloud

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: owncloud contrib mysql issue
« Reply #1 on: January 28, 2013, 06:27:46 PM »
login as root

then
Code: [Select]
mysql

now you have a prompt like
Code: [Select]
mysql>

execute following commands

verify there's a owncloud db with
Code: [Select]
show databases;

if it does not exist then
Code: [Select]
create database owncloud;

finally
Code: [Select]
grant all privileges on owncloud.* to myUser@localhost identified by $myPass;
flush privileges;

note the ";" at the end of each row

HTH

Offline ghorst352

  • ****
  • 180
  • +0/-0
Re: owncloud contrib mysql issue
« Reply #2 on: January 28, 2013, 06:37:40 PM »
Stefano,

I did exactly as you presented and got the following error message:

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '$myPass' at line 1

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: owncloud contrib mysql issue
« Reply #3 on: January 28, 2013, 06:53:56 PM »
ahem..

you must declare both username and password , don't use variables

i.e., for example
Code: [Select]
grant all privileges on owncloud.* to stefano@localhost identified by stefanoverylongpassword;

remember to replace stefano and stefanoverylongpassword with your values :-)

Offline ghorst352

  • ****
  • 180
  • +0/-0
Re: owncloud contrib mysql issue
« Reply #4 on: January 28, 2013, 07:03:40 PM »
Stefano,

I get the same error message??



mysql> grant all privileges on owncloud.* to ocadmin@localhost identified by D1x134dm1n;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'D1x134dm1n' at line 1


I even deleted the database and tried again.  This is frustrating.

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: owncloud contrib mysql issue
« Reply #5 on: January 28, 2013, 07:09:43 PM »
doh, my bad

password must be enclosed into single quotes '

just tried.. sorry..

Offline ghorst352

  • ****
  • 180
  • +0/-0
Re: owncloud contrib mysql issue
« Reply #6 on: January 28, 2013, 07:30:05 PM »
Holy Geez, finally.   Thanks.   :grin:

So I guess I also need to initiate a bug for documentation?

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: owncloud contrib mysql issue
« Reply #7 on: January 28, 2013, 07:31:08 PM »
I think so

Offline ghorst352

  • ****
  • 180
  • +0/-0
Re: owncloud contrib mysql issue
« Reply #8 on: January 28, 2013, 07:49:39 PM »
Stefano,

I still have not got this to work as I have apparently another issue:

Whenever I browse to http://192.168.1.10/owncloud/ I see the directory structure of the html folder?  If I try http://192.168.1.10/owncloud/index.php then I get the following error message "You don't have permission to access /owncloud/index.php on this server."

According to the documentation I am suppose to Browse to http://yourserver/owncloud and follow install script. ???

Offline ghorst352

  • ****
  • 180
  • +0/-0
Re: owncloud contrib mysql issue
« Reply #9 on: January 28, 2013, 07:51:48 PM »
Here are my errors in httpd error log so I guess I need to look at the config.

[Mon Jan 28 13:46:05 2013] [error] [client 192.168.1.28] client denied by server configuration: /home/e-smith/files/ibays/owncloud/html/public.php
[Mon Jan 28 13:46:05 2013] [error] [client 192.168.1.28] client denied by server configuration: /home/e-smith/files/ibays/owncloud/html/cron.php
[Mon Jan 28 13:46:05 2013] [error] [client 192.168.1.28] client denied by server configuration: /home/e-smith/files/ibays/owncloud/html/remote.php
[Mon Jan 28 13:46:05 2013] [error] [client 192.168.1.28] client denied by server configuration: /home/e-smith/files/ibays/owncloud/html/index.php
[Mon Jan 28 13:46:05 2013] [error] [client 192.168.1.28] client denied by server configuration: /home/e-smith/files/ibays/owncloud/html/status.php
[Mon Jan 28 13:46:13 2013] [error] [client 192.168.1.28] client denied by server configuration: /home/e-smith/files/ibays/owncloud/html/index.php
[Mon Jan 28 13:46:15 2013] [error] [client 192.168.1.28] client denied by server configuration: /home/e-smith/files/ibays/owncloud/html/index.php
[Mon Jan 28 13:46:16 2013] [error] [client 192.168.1.28] client denied by server configuration: /home/e-smith/files/ibays/owncloud/html/index.php
[Mon Jan 28 13:46:19 2013] [error] [client 192.168.1.28] client denied by server configuration: /home/e-smith/files/ibays/owncloud/html/index.php
[Mon Jan 28 13:46:27 2013] [error] [client 192.168.1.28] client denied by server configuration: /home/e-smith/files/ibays/owncloud/html/index.php
[Mon Jan 28 13:46:32 2013] [error] [client 192.168.1.28] client denied by server configuration: /home/e-smith/files/ibays/owncloud/html/public.php
[Mon Jan 28 13:46:32 2013] [error] [client 192.168.1.28] client denied by server configuration: /home/e-smith/files/ibays/owncloud/html/cron.php
[Mon Jan 28 13:46:32 2013] [error] [client 192.168.1.28] client denied by server configuration: /home/e-smith/files/ibays/owncloud/html/remote.php
[Mon Jan 28 13:46:32 2013] [error] [client 192.168.1.28] client denied by server configuration: /home/e-smith/files/ibays/owncloud/html/index.php
[Mon Jan 28 13:46:32 2013] [error] [client 192.168.1.28] client denied by server configuration: /home/e-smith/files/ibays/owncloud/html/status.php
[Mon Jan 28 13:48:29 2013] [error] [client 192.168.1.28] client denied by server configuration: /home/e-smith/files/ibays/owncloud/html/index.php

Offline Stefano

  • *
  • 10,839
  • +2/-0
Re: owncloud contrib mysql issue
« Reply #10 on: January 28, 2013, 07:53:31 PM »
bhay3s: one problem -> one topic, thank you