Services/Sync/Server/Archived/0.5/Setup/Storage: Difference between revisions

No edit summary
Line 38: Line 38:
define('WEAVE_AUTH_ENGINE', 'mysql');
define('WEAVE_AUTH_ENGINE', 'mysql');
</pre>
</pre>
For more information on the auth store, see the user setup


=== Sqlite ===
=== Sqlite ===
Line 45: Line 47:
</pre>
</pre>


additionally, create the users table
<pre>
$ sqlite3 <path to stores directory>/_users
SQLite version 3.4.0
sqlite> create table users (username text primary key, md5 text, email text, status integer, alert text);
sqlite> .quit
</pre>
Change the owner of the _users db file to the account your webserver runs under.


=== Mysql ===
=== Mysql ===
Create the mysql database. Add the following tables:
<pre>
create table users
(
username varchar(32) primary key,
md5 varbinary(32),
email varbinary(64),
status tinyint,
alert text
) engine=InnoDB;
</pre>
Constants:


<pre>
<pre>
Line 81: Line 58:


(Note that you don't need to define the second set of constants if you are using the same db for reads and writes)
(Note that you don't need to define the second set of constants if you are using the same db for reads and writes)
You can create users directly in mysql with the following command:
<pre>
insert into users values ('username', md5('password'), null, 1, null);
</pre>
But it is recommended to use the create_user.pl script after setting up the admin-interface (see below).


== Setting up Weave Storage ==
== Setting up Weave Storage ==
canmove, Confirmed users
1,173

edits