Posts

Showing posts with the label persistence

springboot/jpa can't connect to mysql with username “@localhost” using password no?

springboot/jpa can't connect to mysql with username “@localhost” using password no? I'm trying to connect to MySQL database. persistent.xml <?xml version="1.0" encoding="UTF-8"?> <persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd" version="2.1"> <persistence-unit name="myApp"> <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider> <properties> <property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/> <!-- TODO: Change file location to your H2 database ! --> <property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/myDB...