

16 sec ) mysql > select host, user, select_priv, create_priv, insert_priv, grant_priv, account_locked from mysql.

* to 'ponsuke' 'localhost' identified by 'ponsuke' Query OK, 0 rows affected, 1 warning ( 0. * TO 'root' '%' WITH GRANT OPTION | + -+ 1 row in set ( 0. 16 sec ) mysql > show grants for 'root' `%` + -+ | Grants for root | + -+ | GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER ON *. sys | N | N | N | N | Y | | % | root | Y | Y | Y | Y | N | | localhost | ponsuke | N | N | N | N | N | + -+-+-+-+-+-+-+ 4 rows in set ( 0. user + -+-+-+-+-+-+-+ | host | user | select_priv | create_priv | insert_priv | grant_priv | account_locked | + -+-+-+-+-+-+-+ | localhost | rdsadmin | Y | Y | Y | Y | N | | localhost | mysql. Mysql > select host, user, select_priv, create_priv, insert_priv, grant_priv, account_locked from mysql. Type ' \c ' to clear the current input statement.

Other names may be trademarks of their respective owners. Oracle is a registered trademark of Oracle Corporation and / or its affiliates. 28 - log Source distribution Copyright ( c ) 2000, 2018, Oracle and / or its affiliates. Your MySQL connection id is 17 Server version : 5.
#Access denied for user 'root'@'localhost' (using password: yes) on mac password#
com - P 3306 - u ponsuke - p ponsuke_db Enter password : Welcome to the MySQL monitor. 15 sec ) mysql > exit Bye - ログインできました! $ mysql - h mysql. sys | | localhost | rdsadmin | + -+-+ 4 rows in set ( 0. user + -+-+ | host | user | + -+-+ | % | admin | | % | ponsuke | | localhost | mysql. 15 sec ) mysql > select host, user from mysql. * to 'ponsuke' '%' identified by 'password' with grant option Query OK, 0 rows affected, 1 warning ( 0. 16 sec ) - ユーザーを作り直します mysql > grant all privileges on ponsuke_db. RDSにlocalhostで接続することはないので削除します mysql > drop user ponsuke localhost Query OK, 0 rows affected ( 0. com - P 3306 - u ponsuke - p Enter password : ERROR 1045 ( 28000 ): Access denied for user 'ponsuke' 'pxx-xx.xx.xx.ne.jp' ( using password : YES ) $ 原因 : hostがlocalhostだから sys | N | N | N | N | Y | | % | root | Y | Y | Y | Y | N | | localhost | ponsuke | Y | Y | Y | Y | N | + -+-+-+-+-+-+-+ 4 rows in set ( 0.

26 sec ) mysql > select host, user, select_priv, create_priv, insert_priv, grant_priv, account_locked from mysql. * TO 'ponsuke' 'localhost' WITH GRANT OPTION Query OK, 0 rows affected ( 0. ユーザーを作って mysql > create user 'ponsuke' 'localhost' identified by 'password' - 権限を付与した mysql > GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, RELOAD, PROCESS, REFERENCES, INDEX, ALTER, SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER, EVENT, TRIGGER ON *.
