mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-15 12:25:50 +00:00
#141 Configure Unicode and UTF-8 MySQL database for Chinese language
This commit is contained in:
parent
b68d7fc4f3
commit
e74b1bc160
2 changed files with 7 additions and 2 deletions
|
@ -1,4 +1,9 @@
|
||||||
CREATE DATABASE IF NOT EXISTS petclinic;
|
CREATE DATABASE IF NOT EXISTS petclinic;
|
||||||
|
|
||||||
|
ALTER DATABASE petclinic
|
||||||
|
DEFAULT CHARACTER SET utf8
|
||||||
|
DEFAULT COLLATE utf8_general_ci;
|
||||||
|
|
||||||
GRANT ALL PRIVILEGES ON petclinic.* TO pc@localhost IDENTIFIED BY 'pc';
|
GRANT ALL PRIVILEGES ON petclinic.* TO pc@localhost IDENTIFIED BY 'pc';
|
||||||
|
|
||||||
USE petclinic;
|
USE petclinic;
|
||||||
|
@ -57,4 +62,4 @@ CREATE TABLE IF NOT EXISTS visits (
|
||||||
visit_date DATE,
|
visit_date DATE,
|
||||||
description VARCHAR(255),
|
description VARCHAR(255),
|
||||||
FOREIGN KEY (pet_id) REFERENCES pets(id)
|
FOREIGN KEY (pet_id) REFERENCES pets(id)
|
||||||
) engine=InnoDB;
|
) engine=InnoDB;
|
||||||
|
|
|
@ -26,7 +26,7 @@ jpa.database=HSQL
|
||||||
# MySQL Settings
|
# MySQL Settings
|
||||||
|
|
||||||
#jdbc.driverClassName=com.mysql.jdbc.Driver
|
#jdbc.driverClassName=com.mysql.jdbc.Driver
|
||||||
#jdbc.url=jdbc:mysql://localhost:3306/petclinic
|
#jdbc.url=jdbc:mysql://localhost:3306/petclinic?useUnicode=true&characterEncoding=UTF-8
|
||||||
#jdbc.username=root
|
#jdbc.username=root
|
||||||
#jdbc.password=petclinic
|
#jdbc.password=petclinic
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue