com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Accès refusé pour l'utilisateur: ''@'@localhost'. Base 'db_hajar'

Stack Overflow | Chawqi Hajar | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Why do I get a "MySQLSyntaxErrorException:Access denied for user:" error?

    Stack Overflow | 2 years ago | Chawqi Hajar
    com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Accès refusé pour l'utilisateur: ''@'@localhost'. Base 'db_hajar'
  2. 0

    Spring JDBC - Can't connect to database

    Stack Overflow | 2 years ago | shyam
    com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Access denied for user ''@'localhost' to database 'lookup'
  3. 0

    GitHub comment 53#59170589

    GitHub | 2 years ago | raovikas
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.jdbc.datasource.init.DataSourceInitializer#0': Invocation of init method failed; nested exception is org.springframework.jdbc.datasource.init.UncategorizedScriptException: Failed to execute database script; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'petclinic'
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    日志输出的类名不对

    GitHub | 5 years ago | fivesmallq
    com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'novasecd'
  6. 0

    Mysql Error???

    GitHub | 2 years ago | AlexZZ95MC
    com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown database 'pex'

  1. fima 1 times, last 7 months ago
  2. mortalman7 1 times, last 3 months ago
  3. tvrmsmith 4 times, last 6 months ago
  4. DoktorDoener666 1 times, last 2 months ago
  5. Hronom 1 times, last 3 months ago
25 more registered users
70 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException

    Accès refusé pour l'utilisateur: ''@'@localhost'. Base 'db_hajar'

    at sun.reflect.NativeConstructorAccessorImpl.newInstance0()
  2. Java RT
    Constructor.newInstance
    1. sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    2. sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    3. sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    4. java.lang.reflect.Constructor.newInstance(Unknown Source)
    4 frames
  3. MySQL jdbc
    JDBC4Connection.<init>
    1. com.mysql.jdbc.Util.handleNewInstance(Util.java:377)
    2. com.mysql.jdbc.Util.getInstance(Util.java:360)
    3. com.mysql.jdbc.SQLError.createSQLException(SQLError.java:978)
    4. com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3887)
    5. com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3823)
    6. com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:870)
    7. com.mysql.jdbc.MysqlIO.proceedHandshakeWithPluggableAuthentication(MysqlIO.java:1659)
    8. com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1206)
    9. com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2234)
    10. com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2265)
    11. com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2064)
    12. com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:790)
    13. com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:44)
    13 frames
  4. Java RT
    Constructor.newInstance
    1. sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    2. sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    3. sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    4. java.lang.reflect.Constructor.newInstance(Unknown Source)
    4 frames
  5. MySQL jdbc
    NonRegisteringDriver.connect
    1. com.mysql.jdbc.Util.handleNewInstance(Util.java:377)
    2. com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:395)
    3. com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:325)
    3 frames
  6. org.apache.tomcat
    DataSourceProxy.getConnection
    1. org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:307)
    2. org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:200)
    3. org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:699)
    4. org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:633)
    5. org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:484)
    6. org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:142)
    7. org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:115)
    8. org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:102)
    9. org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:126)
    9 frames
  7. org.hibernate.engine
    DatasourceConnectionProviderImpl.getConnection
    1. org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:139)
    1 frame
  8. Hibernate
    Configuration.buildSessionFactory
    1. org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:51)
    2. org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:219)
    3. org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:203)
    4. org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:522)
    5. org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1859)
    5 frames
  9. org.hibernate.jpa
    EntityManagerFactoryBuilderImpl$4.perform
    1. org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:852)
    2. org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:845)
    2 frames
  10. org.hibernate.boot
    ClassLoaderServiceImpl.withTccl
    1. org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:398)
    1 frame
  11. org.hibernate.jpa
    EntityManagerFactoryBuilderImpl.build
    1. org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:844)
    1 frame
  12. Spring ORM
    AbstractEntityManagerFactoryBean.afterPropertiesSet
    1. org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:60)
    2. org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:343)
    3. org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:318)
    3 frames
  13. Spring Beans
    AbstractBeanFactory.getBean
    1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1633)
    2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1570)
    3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
    4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
    5. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
    6. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
    7. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
    8. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
    8 frames
  14. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:956)
    2. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:747)
    3. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
    3 frames
  15. Spring Boot
    SpringApplication.run
    1. org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
    2. org.springframework.boot.SpringApplication.refresh(SpringApplication.java:686)
    3. org.springframework.boot.SpringApplication.run(SpringApplication.java:320)
    4. org.springframework.boot.SpringApplication.run(SpringApplication.java:957)
    5. org.springframework.boot.SpringApplication.run(SpringApplication.java:946)
    5 frames
  16. demo
    DemoJpaApplication.main
    1. demo.DemoJpaApplication.main(DemoJpaApplication.java:10)
    1 frame