First of all, make sure that
- mysqld is running
- - para_server is running and compiled with mysql support (type
- "para_client si" to find out)
- - the user who runs para_client has the paraslash DB_WRITE and DB_READ
- permissions set in server.users
- - the user who runs para_server has create privileges on the mysql
- server.
-Remember: If something doesn't work as expected, look at the server log file
-and/or increase output verbosity by using the -l switch for server and client.
+ - para_server is running and compiled with mysql support
+ (type "para_client si" to find out)
+
+ - the user who runs para_client has the paraslash DB_WRITE
+ and DB_READ permissions set in server.users
+
+ - the user who runs para_server has create privileges on the
+ mysql server.
+
+Remember: If something doesn't work as expected, look at the server
+log file and/or increase output verbosity by using the -l switch for
+server and client.
Specify mysql data (port, passwd,...)
The command
- para_client cdt
+ para_client chs
prints the name of the current selector. Try
- para_client cdt mysql
+ para_client chs mysql
to switch to the mysql selector. If this doesn't work, it means that
some required config options were not specified (check the log for
para_client si
to find out. If mysql is not mentioned as a supported selector,
-you'll have to recompile.
+you'll have to recompile. If configure does not detect your mysql
+installation, use the --enable-mysql-headers and --enable-mysql-libs
+options to specify the mysql path explicitly . Example:
+
+ ./configure --enable-mysql-headers=/Library/MySQL/include \
+ --enable-mysql-libs=/Library/MySQL/lib/mysql
Create a new database
Once the mysql selector is activated, create the database:
para_client cdb
- para_client cdt mysql
+ para_client chs mysql
The second command forces para_server to re-init the mysql selector.
Check the log. There should not be any warnings or errors.
para_client upd
+Note that the mysql selector assumes that the basenames of your audio
+files are unique. If this is not the case, duplicates are ignored.
+
If this command fails, it most likely means the audio file directory
(given in the server configuration file) does not exist, is empty,
-not readable, or contains different files with identical basenames. Fix
-this problem before proceeding.
+or not readable. Fix this problem before proceeding.
The command
Example:
Assume you already have an attribute "test" and you'd like to
- to restrict the set of songs being played to those having the
- "test" attribute set. Define a new stream "only_test" by
+ to restrict audio streaming to those files having the "test"
+ attribute set. Define a new stream "only_test" by
echo 'accept: IS_SET(test)' | para_client stradd only_test
para_client cs only_test
- only the desired songs are going to be played.
+ only the desired files are going to be streamed.
There is no need to keep the temporary files containing the stream
definition since you can always use the strq command to get it back:
or you can let cron do this for you on a daily basis..
-Accept/deny lines affect only the set of admissible songs, but not
-the order in which these songs are played. That's where the score
+Accept/deny lines affect only the set of admissible audio files,
+but not the order in which these are streamed. That's where the score
expression comes into play.
Scoring