Ignore:
Timestamp:
Nov 17, 2008, 11:38:42 AM (14 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #1168: Require UTF-8 to be used as database character set

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/src/docbook/admindoc/installation_upgrade.xml

    r4589 r4637  
    6565    <title>Upgrade instructions</title>
    6666
     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[
     83cd <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   
    67106    <important id="lowess_bug">
    68107      <title>Bug in the LOWESS plug-in affecting BASE version 2.0 -- 2.7.1</title>
     
    872911            is never used to log on to the BASE application.
    873912          </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>
    874921          <variablelist>
    875922            <varlistentry>
     
    886933                  new database. To do this, connect to your MySQL
    887934                  server and issue the next lines:
    888 <programlisting>CREATE DATABASE base2;
    889 CREATE DATABASE base2dynamic;
     935<programlisting>CREATE DATABASE base2 DEFAULT CHARACTER SET utf8;
     936CREATE DATABASE base2dynamic DEFAULT CHARACTER SET utf8;
    890937GRANT ALL ON base2.* TO db_user@localhost IDENTIFIED BY 'db_password';
    891938GRANT ALL ON base2dynamic.* TO db_user@localhost;</programlisting>
    892                 </para>
     939                </para>             
    893940                <para>
    894941                  The <filename>&lt;base-dir&gt;/misc/sql/createdb.mysql.sql</filename>
     
    917964  # this will prompt for an password for the new user, and issue two
    918965  # more question that should be answered with character 'n' for no.
    919 createdb --owner db_user --encoding UNICODE base2
     966createdb --owner db_user --encoding UTF8 base2
    920967psql base2
    921968  # this will start the psql command line tool. Issue the next line
Note: See TracChangeset for help on using the changeset viewer.