| 1 |
README for the mysql database installation for note |
| 2 |
|
| 3 |
Requirements |
| 4 |
============ |
| 5 |
|
| 6 |
You need the following things: |
| 7 |
o perl installed (5.004x) |
| 8 |
o mysql database installed and running |
| 9 |
o Mysql perlmodule (you can find it on |
| 10 |
http://www.mysql.org) PLEASE NOTE: |
| 11 |
It needs the Module "Mysql". The install.sh |
| 12 |
script will install it for you directly from |
| 13 |
CPAN if you like. Newer versions |
| 14 |
are DBI, which you can also use to access |
| 15 |
mysql databases. If you want to use it, you |
| 16 |
have to rewrite the program. Please let me |
| 17 |
know, if you did it :-) |
| 18 |
o permissions to create a new database and |
| 19 |
to write data to this database. |
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
Installation |
| 24 |
============ |
| 25 |
|
| 26 |
First, make sure all these things above are ok. |
| 27 |
You can use the script "install.sh" to create a new |
| 28 |
database and the table structure. You might edit |
| 29 |
the script before running it. |
| 30 |
|
| 31 |
If you are getting trouble, i.e. if you have not the |
| 32 |
required permissions to do that, please make sure, |
| 33 |
you can. |
| 34 |
As user root, you have to give your user the |
| 35 |
neccessary permissions. Please refer to the mysql |
| 36 |
documentation, how to do that. |
| 37 |
After that repeat the step above. |
| 38 |
|
| 39 |
You can find a sample config file within the subdirectory |
| 40 |
"config" named noterc. There are some special values |
| 41 |
which you can use to connect to a different database |
| 42 |
then the default. |
| 43 |
install.sh will create the following database: |
| 44 |
name: user_note |
| 45 |
Maintable: note |
| 46 |
Number: number(int 10) |
| 47 |
Note: note(text) |
| 48 |
Date: date(text) |
| 49 |
|
| 50 |
You can use the file "permissions" as a template for |
| 51 |
modifying a users permissions to her database. Please |
| 52 |
note, that there are different version of mysql out |
| 53 |
there with different access privilege systems, which |
| 54 |
are not compatible, refer to the documentation shipped |
| 55 |
with your mysql installation to learn, how many fields |
| 56 |
are available and what they are for. |
| 57 |
|
| 58 |
You may also take a look to: |
| 59 |
http://www.mysql.org/Manual_chapter/manual_Privilege_system.html |
| 60 |
|
| 61 |
|
| 62 |
This should be all. |
| 63 |
|
| 64 |
Manual Installation |
| 65 |
=================== |
| 66 |
|
| 67 |
1) create a mysql database |
| 68 |
mysqladmin create $db |
| 69 |
|
| 70 |
2) add the required GRANT to a user and database |
| 71 |
echo "GRANT ALL PRIVILEGES ON $db TO $user@localhost IDENTIFIED BY '$password'" | mysql mysql |
| 72 |
|
| 73 |
3) create the schema: |
| 74 |
mysql $db < sql |