Run this command in sail project folder:
docker-compose exec mysql bash
execute the mysql -u root -p
command
provide the default password password
then executes
# May be any user created with sail docker-compose
#
GRANT ALL PRIVILEGES ON *.* TO '<sail-user-from-docker-compose-yml>'@'%';
and
FLUSH PRIVILEGES;
that`s it!
the .env content
when I exec
docker-compose exec mysql bash;docker-compose exec mysql bash; GRANT ALL PRIVILEGES ON *.* TO 'sail'@'%'; FLUSH PRIVILEGES;
;and then in sail project forder, exec./vendor/bin/sail shell; mysql -u sail -p -h 127.0.0.1
,give me an error informationERROR 2003 (HY000): Can't connect to MySQL server on '127.0.0.1:3306' (111)
; when execmysql -u sail -p
, given me an another error informationERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
, how can I connect with DBvaear tool?