【已解决】MyEclipse报错Cannot create PoolableConnectionFactory Access denied for user ‘root’@’localhost’

Cannot create PoolableConnectionFactory Access denied for user ‘root’@’localhost’

遇到这个错误可以在”C:\Program Files\Apache Software Foundation\Tomcat 7.0\conf\server.xml”文件中查找: username=”root”,将相关的password修改为正确的值就可以了。(其中粗体部分为安装路径。)

  <GlobalNamingResources>
    <!-- Editable user database that can also be used by
         UserDatabaseRealm to authenticate users
    -->
    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
              description="User database that can be updated and saved"
              factory="org.apache.catalina.users.MemoryUserDatabaseFactory"
              pathname="conf/tomcat-users.xml" />
    <Resource name="jdbc/webdb" auth="Container"
			  type="javax.sql.DataSource"
			  driverClassName="com.mysql.jdbc.Driver"
			  url="jdbc:mysql://localhost:3306/webdb?characterEncoding=utf-8"
			  username="root"
			  password="root"
			  maxActive="200"
			  maxIdle="50"
			  maxWait="3000"/>
  </GlobalNamingResources>

发表评论

电子邮件地址不会被公开。 必填项已用*标注