Index: lams_common/doc/LAMS 1.1 Database Configuration.txt =================================================================== RCS file: /usr/local/cvsroot/lams_common/doc/LAMS 1.1 Database Configuration.txt,v diff -u -r1.1 -r1.2 --- lams_common/doc/LAMS 1.1 Database Configuration.txt 27 Mar 2005 06:15:22 -0000 1.1 +++ lams_common/doc/LAMS 1.1 Database Configuration.txt 28 Mar 2005 01:41:31 -0000 1.2 @@ -16,14 +16,116 @@ Secondly the transaction isolation level for InnoDB should be set to -READ-COMMITTED: this seems to occur out of the box for Win32 (which is good because there doesn't seem to be a way of altering it that works on -4.1 in Windows) but the linux version (and I am assumeing other UNIX-like OSs) defaults to REPEATABLE-READ. In order to change this for linux you need to create or edit the config file /etc/my.cnf like the -following: +READ-COMMITTED: this seems to occur out of the box for Win32 +(which is good because there doesn't seem to be a way of altering +it that works on 4.1 in Windows) but the linux version (and I am +assumeing other UNIX-like OSs) defaults to REPEATABLE-READ. +In order to change this for linux you need to create or edit +the config file /etc/my.cnf like the following: -[mysqld] -transaction-isolation=READ-COMMITTED + [mysqld] + transaction-isolation=READ-COMMITTED -Note that according to the documentation you should be able to change the system variables to achieve these changes (or at least make changes that produce the same results) using the SET GLOBAL = commands like we do in MySQL 4.0. Unfortunately the SET GLOBAL does not seem to work for many of the system variables 4.1 (though it doesn't produce an error). +Note that according to the documentation you should be able to +change the system variables to achieve these changes (or at +least make changes that produce the same results) using the +SET GLOBAL = commands like we do in MySQL 4.0. +Unfortunately the SET GLOBAL does not seem to work for many of +the system variables 4.1 (though it doesn't produce an error). -Chris \ No newline at end of file +Chris + +--------------------------------------------------------------- +Notes: + +(1) UTF-8 + +MySQL 4.1 Windows version comes with 3 packages, two of which use +Windows aut-installer. Select Most International option, which +sets the character encoding to UTF-8. + +Windows version now installs it as: + + C:\Program Files\MySQL\MySQL Server 4.1 + +* create_lams_11_db.sql now has a line: + + CREATE DATABASE lams DEFAULT CHARACTER SET utf8; + +* properties.xml now has a line: + + + +(2) Conf files + +my.conf is not used for Windows but the conf file is: + + C:\Program Files\MySQL\MySQL Server 4.1\my.ini + +Add the lines below to the my.ini and restart mysqld. + + [mysqld] + transaction-isolation=READ-COMMITTED + +This is a better location for the ini file, since this +allows different instance of MySQL to use different conf. + +Unix/Linux version conf location maybe still at: + + /etc/my.conf (I have not confirmed this) + +If there is no conf file, you can make one by copying +one of the conf files inside the MYSQL_HOME or the +tmplate, and modify it appropriately. + +(3) Service or stand-alone + +Windows Service is suited for production. + + mysqld --install (add the service) + + start/stop from service control panel + + mysqld --remove (remove the service) + + * Linux/Solaris has different syntax for daemon/service + +Stand-alone is suited for development. + + mysqld -u root --console (prints errors on the console) + + mysqladmin -u root -p shutdown + + * Linux/Solaris has different syntax (safe-mysqld?) + +(4) Securing the server + +You must set the root user password + + mysqladmin -u root -password 'yoursecret' + + To change it: + mysql -u root -p + + SET PASSWORD FOR root@localhost=PASSWORD('newsecret'); + +If you forget the root password, you can re-start the +server by skipping the grant table and manually change it. + + killall mysqld (or stop the Service) + mysqld -u root --console --skip-grant-tables + mysql + + USE mysql; + UPDATE user SET password=password("newpassword") + WHERE user="root"; + flush privileges; + quit + + mysqladmin -u root shutdown + mysqld -u root --console + +