记住我试图运行在PHP 5.4的docker环境中,因为Kohana PHP MVC是一个尚未更新且不再支持的框架,得到以下错误Docker mysql_connect():无法连接
mysql_connect(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)" ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(2) ["file":protected]=> string(64) "/var/www/html/modules/database/classes/kohana/database/mysql.php
我泊坞窗命令
sudo docker run -d -p 8080:80 -p 3307:3306 -p 22:22 -v "/home/me/public_html/project-folder:/var/www/html" ushios/lamp-ubuntu
我失去的东西,使之与数据库的工作,感谢
你为什么这样做'-p 3307 :3306'? – apokryfos
看到我以前的问题http://stackoverflow.com/questions/42162285/docker-using-mysql – GAV
**警告**:您正在使用[一个**过时**数据库API](http://stackoverflow.com/q/12859942/19068)已经**完全从最新版本的PHP中删除。你应该使用[现代替换](http://php.net/manual/en/mysqlinfo.api.choosing.php)。 – Quentin