<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hello everybody,<br>
    <br>
    Please excuse me for any mistakes I might do (linguistic or others),
    as well as for the long message.<br>
    <br>
    First of all I will have to say that I bypassed this problem by
    using sqlite. I 'm just reporting this in case there is something
    that could/should be fixed, that exceeds my knowledge to locate.<br>
    <br>
    My environment consists of a Debian 6.0.3 Squeeze box, with apache
    (2.2.16-6+squeeze4), PHP (5.3.3-7+squeeze3) and MySQL
    (5.3.3-7+squeeze3). (versions as reported by apt).<br>
    <br>
    I used owncloud-2.0.1.tar.bz2. <br>
    <br>
    I gave the installer the MySQL root user and password and
    DB_Owncloud2 as a Database name, just to get the following error.<br>
    <br>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <span class="Apple-style-span" style="color: rgb(0, 0, 0);
      font-family: 'Times New Roman'; font-style: normal; font-variant:
      normal; font-weight: normal; letter-spacing: normal; line-height:
      normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px;
      text-transform: none; white-space: normal; widows: 2;
      word-spacing: 0px; -webkit-text-size-adjust: auto;
      -webkit-text-stroke-width: 0px; font-size: medium; display: inline
      !important; float: none; ">[Error message: Could not execute
      statement] [Last executed query: CREATE DATABASE `db_owncloud2`
      DEFAULT CHARACTER SET 'utf8'] [Native code: 1044] [Native message:
      Access denied for user 'oc_mysql_xxxxxxxx'@'localhost' to database
      'db_owncloud2'] MDB2 Error: insufficient permissions: _doQuery:
      [Error message: Could not execute statement] [Last executed query:
      CREATE DATABASE `db_owncloud2` DEFAULT CHARACTER SET 'utf8']
      [Native code: 1044] [Native message: Access denied for user
      'oc_mysql_xxxxxxx'@'localhost' to database 'db_owncloud2']</span><br>
    <br>
    At this point I saw from MySQL that the database has been created,
    as well as ONE user (host being %), but there are no tables inside
    the database.<br>
    <br>
    mysql> show databases;<br>
    +--------------------+<br>
    | Database           |<br>
    +--------------------+<br>
    | information_schema |<br>
    | DB_OwnCloud2       |<br>
    | mysql              |<br>
    +--------------------+<br>
    mysql> use DB_OwnCloud2;<br>
    Database changed<br>
    mysql> show tables;<br>
    Empty set (0.00 sec)<br>
    mysql> use mysql;<br>
    mysql> select * from user where user like 'oc%';<br>
+-----------+------------------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+------------+--------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+<br>
    | Host      | User             |
    Password                                  | Select_priv |
    Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv |
    Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv
    | References_priv | Index_priv | Alter_priv | Show_db_priv |
    Super_priv | Create_tmp_table_priv | Lock_tables_priv | Execute_priv
    | Repl_slave_priv | Repl_client_priv | Create_view_priv |
    Show_view_priv | Create_routine_priv | Alter_routine_priv |
    Create_user_priv | Event_priv | Trigger_priv | ssl_type | ssl_cipher
    | x509_issuer | x509_subject | max_questions | max_updates |
    max_connections | max_user_connections |<br>
+-----------+------------------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+------------+--------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+<br>
    | localhost | oc_mysql_xxxxxxx |
    *pppppppppppppppppppppppppppppppppppppppp | N           |
    N           | N           | N           | N           | N         |
    N           | N             | N            | N         | N         
    | N               | N          | N          | N            |
    N          | N                     | N                | N           
    | N               | N                | N                |
    N              | N                   | N                  |
    N                | N          | N            |          |           
    |             |              |             0 |           0
    |               0 |                    0 |<br>
    | %         | oc_mysql_xxxxxxx |
    *pppppppppppppppppppppppppppppppppppppppp | N           |
    N           | N           | N           | N           | N         |
    N           | N             | N            | N         | N         
    | N               | N          | N          | N            |
    N          | N                     | N                | N           
    | N               | N                | N                |
    N              | N                   | N                  |
    N                | N          | N            |          |           
    |             |              |             0 |           0
    |               0 |                    0 |<br>
+-----------+------------------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+------------+--------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+<br>
    2 rows in set (0.06 sec)<br>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <span class="Apple-style-span" style="color: rgb(0, 0, 0);
      font-family: 'Times New Roman'; font-style: normal; font-variant:
      normal; font-weight: normal; letter-spacing: normal; line-height:
      normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px;
      text-transform: none; white-space: normal; widows: 2;
      word-spacing: 0px; -webkit-text-size-adjust: auto;
      -webkit-text-stroke-width: 0px; font-size: medium; display: inline
      !important; float: none; "></span><span class="Apple-style-span"
      style="color: rgb(0, 0, 0); font-family: 'Times New Roman';
      font-style: normal; font-variant: normal; font-weight: normal;
      letter-spacing: normal; line-height: normal; orphans: 2;
      text-align: -webkit-auto; text-indent: 0px; text-transform: none;
      white-space: normal; widows: 2; word-spacing: 0px;
      -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;
      font-size: medium; display: inline !important; float: none; "></span>mysql>
    select * from db where user like 'oc%';<br>
+------+--------------+------------------+-------------+-------------+-------------+-------------+-------------+-----------+------------+-----------------+------------+------------+-----------------------+------------------+------------------+----------------+---------------------+--------------------+--------------+------------+--------------+<br>
    | Host | Db           | User             | Select_priv | Insert_priv
    | Update_priv | Delete_priv | Create_priv | Drop_priv | Grant_priv |
    References_priv | Index_priv | Alter_priv | Create_tmp_table_priv |
    Lock_tables_priv | Create_view_priv | Show_view_priv |
    Create_routine_priv | Alter_routine_priv | Execute_priv | Event_priv
    | Trigger_priv |<br>
+------+--------------+------------------+-------------+-------------+-------------+-------------+-------------+-----------+------------+-----------------+------------+------------+-----------------------+------------------+------------------+----------------+---------------------+--------------------+--------------+------------+--------------+<br>
    | %    | DB_OwnCloud2 | oc_mysql_xxxxxxx | Y           | Y          
    | Y           | Y           | Y           | Y         | N          |
    Y               | Y          | Y          | Y                     |
    Y                | Y                | Y              |
    Y                   | Y                  | Y            | Y         
    | Y            |<br>
+------+--------------+------------------+-------------+-------------+-------------+-------------+-------------+-----------+------------+-----------------+------------+------------+-----------------------+------------------+------------------+----------------+---------------------+--------------------+--------------+------------+--------------+<br>
    1 row in set (0.08 sec)<br>
    <br>
    Grabbing the dbpassword from config/config.php, I managed to connect
    to the database with "mysql -u oc_mysql_xxxxxxx -p" but what caught
    my attention was his rights.<br>
    <br>
    mysql> show databases;<br>
    +--------------------+<br>
    | Database           |<br>
    +--------------------+<br>
    | information_schema |<br>
    | DB_OwnCloud2       |<br>
    +--------------------+<br>
    2 rows in set (0.06 sec)<br>
    <br>
    mysql> show grants;<br>
+-------------------------------------------------------------------------------------------------------------------------+<br>
    | Grants for
    oc_mysql_xxxxxxx@localhost                                                                                  
    |<br>
+-------------------------------------------------------------------------------------------------------------------------+<br>
    | GRANT USAGE ON *.* TO 'oc_mysql_xxxxxxx'@'localhost' IDENTIFIED BY
    PASSWORD '*pppppppppppppppppppppppppppppppppppppppp' |<br>
+-------------------------------------------------------------------------------------------------------------------------+<br>
    1 row in set (0.00 sec)<br>
    <br>
    my (wild?) guess is that the attempt to create the tables is being
    made with this user, who has no right to do so. (grant usage instead
    of grant all)<br>
    <br>
    At this point I tried to resubmit the configuration form, which led
    me to a different, yet relevant error this time.<br>
    <br>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <span class="Apple-style-span" style="color: rgb(0, 0, 0);
      font-family: 'Times New Roman'; font-style: normal; font-variant:
      normal; font-weight: normal; letter-spacing: normal; line-height:
      normal; orphans: 2; text-indent: 0px; text-transform: none;
      white-space: normal; widows: 2; word-spacing: 0px; font-size:
      medium; display: inline ! important; float: none;">[Error message:
      Table 'DB_OwnCloud2.users' doesn't exist] [Native code: 1146]
      [Native message: Table 'DB_OwnCloud2.users' doesn't exist] MDB2
      Error: connect failed: _doConnect: [Error message: Table
      'DB_OwnCloud2.users' doesn't exist] [Native code: 1146] [Native
      message: Table 'DB_OwnCloud2.users' doesn't exist]'<br>
      <br>
    </span>after which I noticed that a second DB user has been created
    with localhost as Host this time.<br>
    <br>
    mysql> use mysql;<br>
    mysql> select * from user where user like 'oc%';<br>
+-----------+------------------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+------------+--------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+<br>
    | Host      | User             |
    Password                                  | Select_priv |
    Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv |
    Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv
    | References_priv | Index_priv | Alter_priv | Show_db_priv |
    Super_priv | Create_tmp_table_priv | Lock_tables_priv | Execute_priv
    | Repl_slave_priv | Repl_client_priv | Create_view_priv |
    Show_view_priv | Create_routine_priv | Alter_routine_priv |
    Create_user_priv | Event_priv | Trigger_priv | ssl_type | ssl_cipher
    | x509_issuer | x509_subject | max_questions | max_updates |
    max_connections | max_user_connections |<br>
+-----------+------------------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+------------+--------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+<br>
    | localhost | oc_mysql_xxxxxxx |
    *pppppppppppppppppppppppppppppppppppppppp | N           |
    N           | N           | N           | N           | N         |
    N           | N             | N            | N         | N         
    | N               | N          | N          | N            |
    N          | N                     | N                | N           
    | N               | N                | N                |
    N              | N                   | N                  |
    N                | N          | N            |          |           
    |             |              |             0 |           0
    |               0 |                    0 |<br>
    | %         | oc_mysql_xxxxxxx |
    *pppppppppppppppppppppppppppppppppppppppp | N           |
    N           | N           | N           | N           | N         |
    N           | N             | N            | N         | N         
    | N               | N          | N          | N            |
    N          | N                     | N                | N           
    | N               | N                | N                |
    N              | N                   | N                  |
    N                | N          | N            |          |           
    |             |              |             0 |           0
    |               0 |                    0 |<br>
+-----------+------------------+-------------------------------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+------------------+----------------+---------------------+--------------------+------------------+------------+--------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+----------------------+<br>
    2 rows in set (0.03 sec)<br>
    <br>
    while from rights point of view:<br>
    <br>
    mysql> show grants for 'oc_mysql_xxxxxxx'@'localhost';<br>
+-------------------------------------------------------------------------------------------------------------------------+<br>
    | Grants for
    oc_mysql_xxxxxxx@localhost                                                                                  
    |<br>
+-------------------------------------------------------------------------------------------------------------------------+<br>
    | GRANT USAGE ON *.* TO 'oc_mysql_xxxxxxx'@'localhost' IDENTIFIED BY
    PASSWORD '*pppppppppppppppppppppppppppppppppppppppp' |<br>
+-------------------------------------------------------------------------------------------------------------------------+<br>
    1 row in set (0.11 sec)<br>
    <br>
    mysql> show grants for 'oc_mysql_xxxxxxx'@'%';<br>
+-----------------------------------------------------------------------------------------------------------------+<br>
    | Grants for
    oc_mysql_xxxxxxx@%                                                                                  
    |<br>
+-----------------------------------------------------------------------------------------------------------------+<br>
    | GRANT USAGE ON *.* TO 'oc_mysql_xxxxxxx'@'%' IDENTIFIED BY
    PASSWORD '*pppppppppppppppppppppppppppppppppppppppp' |<br>
    | GRANT ALL PRIVILEGES ON `DB_OwnCloud2`.* TO
    'oc_mysql_xxxxxxx'@'%'                                             
    |<br>
+-----------------------------------------------------------------------------------------------------------------+<br>
    2 rows in set (0.02 sec)<br>
    <br>
    (shouldn't grant all be limited to localhost only???)<br>
    <br>
    <br>
    As far as I can tell, the error occurs at lib/setup.php line 128.<br>
    <br>
    At this point I thought I'd try to comment lines 127 - 129, 131, to
    force "OC_DB::createDbFromStructure('db_structure.xml');" to be
    executed, just to get the following error<br>
    <br>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <span class="Apple-style-span" style="color: rgb(0, 0, 0);
      font-family: 'Times New Roman'; font-style: normal; font-variant:
      normal; font-weight: normal; letter-spacing: normal; line-height:
      normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px;
      text-transform: none; white-space: normal; widows: 2;
      word-spacing: 0px; -webkit-text-size-adjust: auto;
      -webkit-text-stroke-width: 0px; font-size: medium; display: inline
      !important; float: none; ">[Error message: unable to establish a
      connection] [Native code: 0] MDB2 Error: connect failed:
      _doConnect: [Error message: unable to establish a connection]
      [Native code: 0]</span><br>
    <br>
    At this point I decided to write this mail and use sqlite instead of
    MySQL :p<br>
    <br>
    I'm afraid that the level of my knowledge of PHP does not allow me
    to dig any deeper, but I am willing to provide any other information
    that could be useful.<br>
    <br>
    In the next few days I hope I will have the chance to try owncloud 3
    as well (never used git before :redface:) so as to see if the same
    thing happens there to.<br>
    <br>
    Thank you all very much for your time.<br>
    <br>
    Kind regards,<br>
    <br>
    Chris<br>
  </body>
</html>