Uploaded image for project: 'Fedora Repository Project'
  1. Fedora Repository Project
  2. FCREPO-1200

Running the mysql create database command the database was created as latin1 not utf-8



    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: Fedora 3.3
    • Fix Version/s: None
    • Component/s: legacy - Fedora
    • Labels:
    • Environment:
      Red Hat Enterprise Linux Server release 6.4 (Santiago)


      Following the instructions at:


      it tells you to run:

      Create the database. For example, to create a database named "fedora3", enter:

      CREATE DATABASE fedora3;

      which by default created a latin1 encoded database:

      mysql> status
      mysql Ver 14.14 Distrib 5.1.67, for redhat-linux-gnu (x86_64) using readline 5.1

      Connection id: 11140
      Current database: fedora33
      Current user: root@localhost
      SSL: Not in use
      Current pager: stdout
      Using outfile: ''
      Using delimiter: ;
      Server version: 5.1.67 Source distribution
      Protocol version: 10
      Connection: Localhost via UNIX socket
      Server characterset: latin1
      Db characterset: latin1
      Client characterset: latin1
      Conn. characterset: latin1
      UNIX socket: /var/lib/mysql/mysql.sock
      Uptime: 90 days 18 hours 33 min 5 sec

      Threads: 3 Questions: 240484138 Slow queries: 4 Opens: 48 Flush tables: 1 Open tables: 41 Queries per second avg: 30.663

      we only discovered this when trying to ingest a Dublin Core datastream which had the ลท character in them and we got the following error:

      Caused by: java.sql.SQLException: Incorrect string value: '\xC5\xB7... ...' for column 'dcDescription' at row 1
      at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
      at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
      at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1936)
      at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2060)
      at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2542)
      at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1734)
      at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2019)
      at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1937)
      at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1922)
      at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101)
      at fedora.server.utilities.SQLUtilityImpl.i_updateRow(SQLUtilityImpl.java:205)
      at fedora.server.utilities.SQLUtilityImpl.i_replaceInto(SQLUtilityImpl.java:143)
      at fedora.server.utilities.SQLUtility.replaceInto(SQLUtility.java:91)
      at fedora.server.search.FieldSearchSQLImpl.update(FieldSearchSQLImpl.java:240)

      Would it be possible to change the Documentation to get people to check what the default character set is for their database or create the database as utf-8 by deafult?




            • Assignee:
              glen_robson Glen Robson
            • Votes:
              0 Vote for this issue
              2 Start watching this issue


              • Created: