这是我尝试连接到数据库的方式:
这是我对DB的了解:
define( 'DB_NAME', 'wordpress' );
define( 'DB_USER', 'wordpress' );
define( 'DB_PASSWORD', 'wordpress' );
define( 'DB_HOST', 'database' );
按测试连接时出现此错误
[08000][-1] Could not connect to address=(host=database)(port=3306)(type=master) : Socket fail to connect to host:database, port:3306. database java.net.UnknownHostException: database.
有什么建议吗?