我无法在Travis CI上运行测试,因为我找不到在容器中设置
mysql 5.7的方法.
sudo apt-get remove --purge "^mysql.*"
sudo apt-get autoremove
sudo apt-get autoclean
sudo rm -rf /var/lib/mysql
sudo rm -rf /var/log/mysql
echo mysql-apt-config mysql-apt-config/enable-repo select mysql-5.7-dmr | sudo debconf-set-selections
wget http://dev.mysql.com/get/mysql-apt-config_0.2.1-1ubuntu12.04_all.deb
sudo dpkg --install mysql-apt-config_0.2.1-1ubuntu12.04_all.deb
sudo apt-get update -q
sudo apt-get install -q -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" mysql-server
在那之后,我正在做:
$mysql -uroot < tests/ApiBundle/Datas/dump_test.sql
ERROR 1698 (28000): Access denied for user 'root'@'localhost'
为什么?我尝试了很多东西……谷歌绝对不是我这个问题的朋友……