Kohana 3.1.4: Database_Exception [ 2 ]: mysql_connect(): Access denied

孤人 提交于 2020-01-05 09:14:19

问题


I´m trying to walk through a tutorial for kohana

I have copied the scripts but I getting the following error message:

ERROR: Database_Exception [ 2 ]: mysql_connect(): Access denied for user 'www-data'@'localhost' (using password: NO) ~ MODPATH/database/classes/kohana/database/mysql.php [ 67 ]

Could anyone give me some hints to where the problem might lie? I have other projects which use mysql so I know that the password and username are correct.


回答1:


If you change the username in your config/database.php, does the error message change or does it stay the same?

If it changes, then you might have problems with the user permissions on the mysql installation. If you have PhpMyAdmin, it's simple to fix. Goto privleges, click the user and enter % for allowable hosts (or if you're paranoid, type just 127.0.0.1 so you can access it only locally).

If it's not, then you haven't setup database.php correctly and we need to see it to correct it.



来源:https://stackoverflow.com/questions/10483322/kohana-3-1-4-database-exception-2-mysql-connect-access-denied

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!