mysql - Access database outside of vagrant box as user -
i'm using homestead , have created multiple databases. wanted use new username/password combination each database create. did this
create database testdb character set utf8; create user 'testuser'@'localhost' identified 'testpassword'; grant privileges on testdb.* 'testuser'@'localhost';
now, when access vagrant box via vagrant ssh
, use command
$ mysql -utestuser -ptestpassword
i can connect database. however, when trying access database outside (like via client (sequel pro)) can't connect database created user.
i can, however, connect "base account" homestead:secret. homestead user can access every database, wanted use newly created user. how achieve this?
the error comes sequel pro
access denied user 'testuser'@'10.0.2.2' (using password: yes)
this db connection config
you must grant access outside user:
create user 'testuser'@'10.0.2.2' identified 'testpassword'; grant privileges on testdb.* 'testuser'@'10.0.2.2';
Comments
Post a Comment