Installing mysqlwdb =================== Before trying to run mysqlwdb please read the REQUIREMENTS and the WARNINGS documents, that you should find along with the program. To configure and to install mysqlwdb on your system, please follow these instructions: 1) Edit mysqlwdb.pl and -------------------- a) change the first line to reflect the path to Perl on your system. E.g. 1) '/usr/local/bin/perl' so the first line of mysqlwdb.pl would be '#!/usr/local/bin/perl' 2) '/usr/bin/perl' so the first line of mysqlwdb.pl would be '#!/usr/bin/perl' 3) 'c:\perl\bin\perl.exe' so the first line of mysqlwdb.pl would be '#!c:\perl\bin\perl.exe' If you are not able to know where perl is located on your system, type 'which perl' in your shell (on a unix-like system). b) The default behaviour of mysqlwdb is to be prompted for the login to a MySQL server. If you want to manage MySQL databases in a custom manner, set $custom_configuration variable to 1 and follow the rest of this b) section. It possible to manage more than 1 database. If you put data for only 1 database, you will not prompt for databases choice. If you put data for more than 1 database, a menu of choice will appear. To manage only one database =========================== 1) go to the section: Database(s) & user(s) variables section Now you can see the variable my %DATABASES= ( 1 => { host => " ! PUT HOST HERE ! ", port => " ! PUT PORT HERE ! ", #3306 is the standard MySQL port database => " ! PUT DATABASE NAME HERE ! ", user => " ! PUT USER HERE ! ", password => " ! PUT PASSWORD HERE ! ", db_description => " ! PUT DB_DESCRIPTION HERE ! " }, # some comments ); 2) change the entries: host , port , database , user , password , db_description according to your needs. E.g. host => "localhost", port => "3306", #3306 is the standard MySQL port database => "test", user => "root", password => "****", db_description => "Database for test" To manage more than one database ================================ 1) go to the section: Database(s) & user(s) variables section 2) change the entries for the first database as explained above in "To manage only one database" 3) replace (copy & paste) the structure 1 => { host => " ! PUT HOST HERE ! ", port => " ! PUT PORT HERE ! ", #3306 is the standard MySQL port database => " ! PUT DATABASE NAME HERE ! ", user => " ! PUT USER HERE ! ", password => " ! PUT PASSWORD HERE ! ", db_description => " ! PUT DB_DESCRIPTION HERE ! " }, within the %DATABASES= ( ); limits. 4) change the entries for the second database as explained above in "To manage only one database" 5) change the database order number (e.g. 1 will change in 2) E.g. for 3 databases %DATABASES= ( 1 => { host => "localhost", port => "3306", #3306 is the standard MySQL port database => "test", user => "root", password => "****", db_description => "Database for test" }, 2 => { host => "127.0.0.1", port => "3306", #3306 is the standard MySQL port database => "my_db", user => "userA", password => "*****", db_description => "Personal database" }, 3 => { host => "192.168.0.1", port => "3306", #3306 is the standard MySQL port database => "another_db", user => "userB", password => "******", db_description => "Another personal database" }, ); c) It is possible to prompt user for login. i) If you do not want to manage user(s): a) leave untouched ii) If you want to manage user(s), please: a) remove all # between the %LOGIN string and the ")" (e.g. #"user1" => "pwd1",) b) change the user(s) id and password according to your needs c) set $login_prompt variable to 1 e.g. for 1 user: %LOGIN=( "onlyme" => "mypwd", ); e.g. for 3 users: %LOGIN=( "user1" => "pwduser1", "user2" => "pwduser2", "user3" => "pwduser3", ); d) set the $recent_DBD_is_pri_key variable value to 1 if you have a recent version of Msql-Mysql-modules (the package that contains DBD::mysql). If you have an older version set the variable to 0. Here, 'recent' means version 1.21_07 or greater (1998-11-08). **The tipically value is 1** (NOTE: This is needed due to the MySQL-specific method "is_pri_key" that in recent versions of DBD::mysql is deprecated. Correct one is now "mysql_is_pri_key". It depends on the version of the Msql-Mysql-modules you have installed (type 'perldoc DBD::mysql' for details).) e) set the $recent_DBD_dsn_syntax variable value to 1 if you have a recent version of Msql-Mysql-modules (i.e. DBD::mysql). If you have an older version set the variable to 0. Here, 'recent' means version 1.19_03 or greater (1998-02-06). **The tipically value is 1** (NOTE: This is needed due to the different versions for the 'dsn' syntax e.g. i) $dsn="DBI:$DBI_driver:$database:$host"; for older DBD::mysql or ii) $dsn="DBI:$DBI_driver:database=$database;host=$host"; for recent ones (ODBC like). It depends on the version of the Msql-Mysql-modules you have installed (type 'perldoc DBD::mysql' for details).) f) set the $obsolete_DBD_ListTables variable value to 0 if you have a recent version of Msql-Mysql-modules (the package that contains DBD::mysql). If you have an older version set the variable to 1. Here, 'recent' means version 1.21_07 or greater (1998-11-08). **The tipically value is 1** (NOTE: MySQL-specific function "_ListTables" is obsolete in recent versions of DBD::mysql. Now is better to use the DBI method $dbh->tables(). But due to a problem of $dbh->tables() with empty databases in old drivers, the default value is 1 as a precaution. It depends on the version of the Msql-Mysql-modules you have installed (type 'perldoc DBD::mysql' for details).) Set to 0 if you report problems (i.e. warnings) on your web server log. g) try set the $ListDBs_data_sources variable value to 0 if you encounter problems getting the database list via the initial login form **The tipically value is 1** 2) Put mysqlwdb.pl in your cgi-bin and make sure it is executable. --------------------------------------------------------------- E.g. type 'chmod 755 mysqlwdb.pl' on a unix-like system. 3) Be sure that your web server can execute .pl type files. -------------------------------------------------------- Otherwise you can change the script name accordingly to the suffixes accepted by your web server. 4) Call the script using a web browser. ------------------------------------ Using a different name instead of 'mysqlwdb.pl' =============================================== You can freely change the name of the script (E.g. 'mv mysqlwdb.pl something.else', on a unix-like system). You have only to change the $thiscgi variable accordingly to the new name you choose. Configuring mysqlwdb look and actions ===================================== mysqlwdb is easy to configure for what concerns several aspects of its HTML look and DBMS actions: 1) HTML layout You can change table colors, font size and font color, form elements look, HTML header and footer. To do this, please edit mysqlwdb.pl then go to section HTML layout and make the changes you need. 2) Configurable actions You can choose what type of action you can do with mysqlwdb. To do this, please edit mysqlwdb.pl then go to section Configurable actions and make the changes you need. In particular the subsections: a) DBMS actions to enable or disable the operations on tables and records b) javascript check to enable or disable the javascript functions 3) Create table specific You can choose specifiers and their order, the character not allowed in tables and field names and you can configure types and specifiers. To do this, please edit mysqlwdb.pl then go to section Create table specific (and also to the end of line) and make the changes you need. 4) Messages You can change the text of the buttons, of the warnings and the error messages, of the javascript alerts, and so on. To do this, please edit mysqlwdb.pl then go to section Messages and make the changes you need.