Controlling the database
Do you still remember the password for the database?
Before you forget it, we'll control if the database is
OK. (Well, it's a critical step, if it doesn't work,
you'll have to pay a new guiness to your
administrator)
$ mysql dabase -udaiouser -pdapass
mysql> create table matable (madate date);
Query OK, 0 rows affected (0.00 sec)
mysql> insert into matable values (now());
Query OK, 1 row affected (0.00 sec)
mysql> show tables;
+------------------+
| Tables in dabase |
+------------------+
| matable |
+------------------+
1 row in set (0.00 sec)
mysql> describe matable;
+--------+------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------+------+------+-----+---------+-------+
| madate | date | YES | | NULL | |
+--------+------+------+-----+---------+-------+
1 row in set (0.00 sec)
mysql> select * from matable;
+------------+
| madate |
+------------+
| 2001-01-04 |
+------------+
1 row in set (0.00 sec)
mysql> drop table matable;
Query OK, 0 rows affected (0.00 sec)
mysql> show tables;
Empty set (0.00 sec)
mysql> exit
Bye
|
Creating
the tables
Stil remember the password? Great!
Modify daCode/sql/dacode.mysql at the line:
INSERT INTO users (id,login,passwd,level,email) VALUES ('2', 'admin','X','6291456','root');
|
and replace root with your email adress.
Then create your tables with the SQL script
(dacode.mysql).
$ mysql dabase -vvv -udaiouser -pdapass < daCode/sql/dacode.mysql
|
daCode may come with a file dump.sql wich would hold some
exemples. the install will be the same. But if you don't
use MySQL, you'll have to adapt this. If you use
PostGres, you have a daCode.pgsql script in sql/, fint
out by yourself how to run it. If you have another SQL
server, you're in trouble, as they're unsupported by
daCode.