Changeset 4637
- Timestamp:
- Nov 17, 2008, 11:38:42 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/config/dist/base.config
r4508 r4637 30 30 db.dialect = org.hibernate.dialect.MySQLInnoDBDialect 31 31 db.driver = com.mysql.jdbc.Driver 32 db.url = jdbc:mysql://localhost/base2? useCursorFetch=true&defaultFetchSize=100&useServerPrepStmts=true32 db.url = jdbc:mysql://localhost/base2?characterEncoding=UTF-8&useCursorFetch=true&defaultFetchSize=100&useServerPrepStmts=true 33 33 db.dynamic.catalog = base2dynamic 34 34 db.queries = /mysql-queries.xml -
trunk/doc/configure_unicode_support.txt
r2940 r4637 70 70 look in the documentation for that container how to make the configuration 71 71 in step 2. 72 73 74 Other character encodings75 -------------------------76 Of course, you are not limited to the UTF-8 character encoding. You can specify77 any encoding you want as long as the encoding is supported by both the database78 and the servlet container. If you want to change the encoding after the database79 has been created and populated with data you must somehow tell the database engine80 to convert the existing data to the new encoding. For instructions how to do that81 (it might be impossible) look in the documentation for your database.82 -
trunk/doc/src/docbook/admindoc/installation_upgrade.xml
r4589 r4637 65 65 <title>Upgrade instructions</title> 66 66 67 <important id="useUTF8"> 68 <title>BASE 2.9 must use a database that supports UTF-8</title> 69 <para> 70 If you are upgrading from BASE 2.8 or lower and your existing 71 database is not using UTF-8 you must convert the database to 72 UTF-8 <emphasis>before you execute the <code>./updatedb.sh</code></emphasis> 73 script. 74 </para> 75 <para> 76 BASE 2.9 includes a utility that can convert an existing MySQL 77 database. After installing the BASE 2.9 files, but <emphasis>before</emphasis> 78 running the <code>./updatedb.sh</code> script, execute the following 79 on the command line: 80 </para> 81 <programlisting> 82 <![CDATA[ 83 cd <base-dir>/bin 84 ./onetimefix.sh utf8 -x 85 ]]> 86 </programlisting> 87 88 <para> 89 The <code>-x</code> option makes the script update the database immediately. 90 You can leave this option out to have it generate a SQL script file 91 (<filename>convert-to-utf8.sql</filename>) instead. The script will by default 92 not try to convert tables that it already thinks are using UTF-8. If the script 93 for some reason is incorrect when detecting this, you can use the option 94 <code>-f</code> to force conversion of all tables. 95 </para> 96 97 <para> 98 The conversion utility only works with MySQL. PostgreSQL users should 99 instead use a backup and restore using as described in the 100 <ulink url="http://www.postgresql.org/docs/8.1/static/backup.html">PostgreSQL manual</ulink>. 101 Eg. dump the existing BASE database, create a new database that uses UTF8 and 102 restore the backup into the new database. 103 </para> 104 </important> 105 67 106 <important id="lowess_bug"> 68 107 <title>Bug in the LOWESS plug-in affecting BASE version 2.0 -- 2.7.1</title> … … 872 911 is never used to log on to the BASE application. 873 912 </note> 913 <important> 914 <title>The database must use the UTF-8 character set</title> 915 <para> 916 Otherwise there will be a problem with storing values 917 that uses characters outside the normal Latin1 range, for 918 example unit-related such as µ (micro) and Ω (ohm). 919 </para> 920 </important> 874 921 <variablelist> 875 922 <varlistentry> … … 886 933 new database. To do this, connect to your MySQL 887 934 server and issue the next lines: 888 <programlisting>CREATE DATABASE base2 ;889 CREATE DATABASE base2dynamic ;935 <programlisting>CREATE DATABASE base2 DEFAULT CHARACTER SET utf8; 936 CREATE DATABASE base2dynamic DEFAULT CHARACTER SET utf8; 890 937 GRANT ALL ON base2.* TO db_user@localhost IDENTIFIED BY 'db_password'; 891 938 GRANT ALL ON base2dynamic.* TO db_user@localhost;</programlisting> 892 </para> 939 </para> 893 940 <para> 894 941 The <filename><base-dir>/misc/sql/createdb.mysql.sql</filename> … … 917 964 # this will prompt for an password for the new user, and issue two 918 965 # more question that should be answered with character 'n' for no. 919 createdb --owner db_user --encoding U NICODEbase2966 createdb --owner db_user --encoding UTF8 base2 920 967 psql base2 921 968 # this will start the psql command line tool. Issue the next line -
trunk/doc/src/docbook/appendix/base.config.xml
r4509 r4637 113 113 <note> 114 114 <para> 115 For MySQL we recommend that you enable the server-side cursors feature. 116 It will reduce memory usage since the JDBC driver does not have to 117 load all data into memory: 115 For MySQL we recommend that you set the character encoding to UTF-8 116 and enable the server-side cursors feature. The latter option will 117 reduce memory usage since the JDBC driver does not have to 118 load all data into memory. The value below should go into one line 118 119 <userinput> 119 jdbc:mysql://localhost/base2?useCursorFetch=true&defaultFetchSize=100 120 jdbc:mysql://localhost/base2?characterEncoding=UTF-8& 121 useCursorFetch=true&defaultFetchSize=100&useServerPrepStmts=true 120 122 </userinput> 121 123 </para> -
trunk/misc/sql/createdb.mysql.sql
r4509 r4637 39 39 corresponding changes in your base.config file. 40 40 */ 41 42 41 CREATE DATABASE `base2` DEFAULT CHARACTER SET utf8; 43 42 CREATE DATABASE `base2dynamic` DEFAULT CHARACTER SET utf8; … … 45 44 GRANT ALL ON `base2`.* TO 'base2user'@'localhost' IDENTIFIED BY 'password'; 46 45 GRANT ALL ON `base2dynamic`.* TO 'base2user'@'localhost'; 47 48 /*For MySql 5.0 only49 SET PASSWORD FOR 'base2user'@'localhost' = OLD_PASSWORD('password');50 FLUSH PRIVILEGES;*/ -
trunk/misc/sql/createdb.postgres.sql
r4509 r4637 40 40 */ 41 41 CREATE USER "base2user" PASSWORD 'password'; 42 CREATE DATABASE "base2" OWNER "base2user" ENCODING 'U NICODE';42 CREATE DATABASE "base2" OWNER "base2user" ENCODING 'UTF8'; 43 43 \c "base2" 44 44 CREATE SCHEMA "dynamic" AUTHORIZATION "base2user";
Note: See TracChangeset
for help on using the changeset viewer.