Vagrant VM
을 사용하여 MySQL
에 연결하려고합니다. 나는 방랑 SSH에 [email protected]
를 사용하여 MySQL
에 액세스 할 수 있습니다,하지만 난 방랑 VM에 사용되는 IP, 나는 access denied
오류를 얻고있다 [email protected]
을 사용하여 연결합니다.'root'@ 'IP_Address'를 사용하여 MySQL에 연결할 수 없습니다.
이 내 방랑 파일 설정입니다 :
# Create a forwarded port mapping which allows access to a specific port
# within the machine from a port on the host machine. In the example below,
# accessing "localhost:8080" will access port 80 on the guest machine.
config.vm.network "forwarded_port", guest: 80, host: 8080
config.vm.network "forwarded_port", guest: 3306, host: 3306
# Create a private network, which allows host-only access to the machine
# using a specific IP.
config.vm.network "private_network", ip: "192.168.33.10"
[email protected] 이미 MySQL을 추가하고, 권한을
mysql> select User,Host from mysql.user;
+-----------+---------------+
| User | Host |
+-----------+---------------+
| root | 192.168.33.10 |
| mysql.sys | localhost |
| root | localhost |
+-----------+---------------+
3 rows in set (0.00 sec)
MySQL의 5.7 mysqld.cnf 부여됩니다
I have tried bind-address to '0.0.0.0' and bind-address '192.168.33.10'.
아직도 오류 메시지가 표시됩니다 :
[email protected]:/etc/mysql/mysql.conf.d$ mysql -u [email protected] -p
Enter password:
ERROR 1045 (28000): Access denied for user '[email protected]'@'localhost' (using password: YES)
SQL 연결에 암호가 필요하지 않을 때 암호를 설정했다고 생각합니다. –
방랑자에 대해 잘 알지 못하지만 VM 또는 호스트 또는 다른 컴퓨터에서 mysql에 액세스하려고합니까? 나는 로컬에서 추측하고 있으므로 다른 사용자를 생성하고 루트 대신이 아이디로 연결하거나이 IP에 대한 액세스 권한을 부여하여'GRANT ALL PRIVILEGES ON *. * TO 'root'@'192.168.33.10'으로 식별됩니다 'P4 $ $ WORD '부여와 함께; –