#はじめに
dotinstallでPHPのtodoアプリを作っていた時に以下のようなエラーが出たので解決方法を載せておきます。
SQLSTATE[HY000] [1044] Access denied for user 'dbuser'@'localhost' to database 'dotinstall_todo_app'
#原因
ユーザーに権限を譲渡する時に以下のようにユーザー名を間違えて譲渡したことでエラーが出ていた
[vagrant@localhost]$create user dbuser
[vagrant@localhost]$create database dotinstall_todo_app
[vagrant@localhost]$grant all on dotinstall_todo_app.* to dbuserr;
#解決方法
以下のようにもう一度設定し直したらエラーが解決できました
[vagrant@localhost]grant all on dotinstall_todo_app.* to dbuser;
以上です