java连接mysql被拒绝
我在程序里面写了一个监听器,Tomcat启动的时候就会去检测数据库是否连接上了,但是报了错
Access denied for user 'root'@'localhost' (using password: YES)
访问被拒绝,怎样修改访问用户的权限啊,我用root不可以,新建一个用户也不可以
应该是root没有远程连接的权限。你看下
use mysql
select Host,User,Password from user;
看看结果就知道了。
那怎么修改啊 我现在的连接字符串是本机
jdbc.master.url=jdbc:mysql://localhost:3306/ytga?zeroDateTimeBehavior=convertToNull
jdbc.master.username=root
jdbc.master.password=mysql
使用本机的IP也不可以
jdbc.master.url=jdbc:mysql://192.168.0.203:3306/ytga?zeroDateTimeBehavior=convertToNull
jdbc.master.username=root
jdbc.master.password=mysql
我的访问的是本机的mysql数据库
远程连接数据库没这么麻烦吧,以前连接sql2000直接来个ip就连了,
不知道为什么,路过帮顶。
2009-09-15 10:19:05,937 ERROR [org.hibernate.util.JDBCExceptionReporter] - <Cannot create PoolableConnectionFactory (Access denied for user 'ghb'@'web.rambo.lan' (using password: YES))>2009-09-15 10:19:13,171 INFO [org.quartz.simpl.SimpleThreadPool] - <Job execution threads will use class loader of thread: main>
2009-09-15 10:19:13,234 INFO [org.quartz.core.QuartzScheduler] - <Quartz Scheduler v.1.6.0 created.>
2009-09-15 10:19:13,234 INFO [org.quartz.simpl.RAMJobStore] -
相关问答:
我想使用Lucene的代码,发现要import一批文件:
============
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.document.Document;
………………
===== ......
用RandomAccessFile写入TXT文件查看时是乱码,请问有什么方法可以写成可读的文件,不是用其他的文件操作,就是只用RandomAccessFile的方法是否可以实现?
Java code:
import java.io.*;
public class RandomAcce ......
我想用Java写一个程序,就是我想在运行代码后,在指定的时间打开某程序,例如我运行代码后,讲在12:00打开"D:\Program Files\Tencent\QQ2009\Bin\QQ.exe"这个程序,求高人指点。还有可能的话在指定的时间 ......
当知道一个日期,如何把这个日期所在旬的前后两个日期取出
比如输入20090905,就输入20090901 20090910
输出20090901 20090910
取得天数后作一下判断再把这个方法用下void set(int field, int value)
......