search

Home  >  Q&A  >  body text

MySQL displays Chinese weekday - Stack Overflow

I set set lc_time_names='zh_CN'; in the database;
The query using SELECT @@lc_time_names; has changed.
Then the sql query select dayname(CURRENT_DATE); is also correct (shows Monday), But when using Java to connect to the database, the query is still in English?

Have you looked for the answer yourself?
Tried:
1. Change the English system to Chinese, it doesn’t work.
2. Run the SQL statement in Java and set it up, it is also correct, but so A bit cumbersome.

三叔三叔2704 days ago974

reply all(1)I'll reply

  • 習慣沉默

    習慣沉默2017-07-04 13:45:34

    Modify the mysql startup configuration file my.ini and add the following content:

    lc_time_names = zh_CN

    reply
    0
  • Cancelreply