facebook

[Closed] MySQL character Encoding problem

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #261610 Reply

    ziban
    Member

    I cannot connect to MySQL database. When connecting, it display an error as follow:

    Error while trying to login to database:
    Unknown initial character set index ’48’ received from server. Initial client character set can be forced via the ‘characterEncoding’ propoerty.

    I set mysql character encoding to the default : utf-8:unicode.

    Solution :
    A. set the JDBC encoding property
    But I dont know whether there is any way to set the JDBC character encoding property.
    B. Change the database to JDBC encoding property
    But I dont know what character encoding the JDBC is using

    Please advise.

    Many thanks in advance.

    #261613 Reply

    Haris Peco
    Member

    ziban,

    Try set jdbc URL to something like this :
    jdbc:mysql://<YOUR_HOST>:<YOUR_PORT>/<YOUR_DATABASE>?useUnicode=true&characterEncoding=UTF-8

    See http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-configuration-properties.html for more details

    Regards,

    #261615 Reply

    harrz
    Member

    hi ziban,

    i had that problem just a few days ago. I solved it by using an older jdbc driver (version 3.0).

    #261700 Reply

    ziban
    Member

    got it done…. apologise… i checked in mysql.ini, the connection character encoding was latin…. i changed it then to utf8 and sorted.

    Many thanks to the replies : )

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: [Closed] MySQL character Encoding problem

You must be logged in to post in the forum log in