不明白 jenkins ci build 是如何工作的
我在詹金斯中有我的项目,当你构建它时,它会找到 script/cibuild 脚本并执行你在那里的任何内容。我从项目目录运行脚本,一切都很好,我从詹金斯运行构建,我收到错误吗?我不明白?
我的脚本/cibuild脚本:
#!/bin/sh
# This script file is the entry point to ci.miranetworks.net build/test process.
# It is executed by jenkins, from the root directory
#
echo "1. cd into script "
cd script
echo "2. run createmysqldb test_traffic test_user password"
./createmysqldb test_traffic test_user password
echo "3. cd back into root dir "
cd ..
echo "4. create table with sql with: "
mysql -u test_user --password=password test_traffic < ./phoenix/data/sql/lib.model.schema.sql
export WORKSPACE=phoenix
export SYMFONY=$WORKSPACE/lib/vendor/symfony/lib
(cd $WORKSPACE
echo "6. Clearing the cache"
./symfony cc
echo "7. Run unit test"
./symfony php test/unit/RbcTest.php
)
echo "8. All done and exiting"
exit 0
所以当我使用 mysql -u test_user --password=password test_traffic 登录到mysql命令时,它是成功的,然后我授予所有并且我也得到:
ERROR 1045 (28000): Access denied for user 'test_user'@'localhost' (using password: YES)
虽然在createmysqldb中我这样做:Q2 =“GRANT ALL ON <强>。至“$2”@“localhost”,由“$3”标识;”
谁能解释一下为什么我的访问被拒绝? 我对同一脚本有另一个问题,但想先解决这个问题:)
谢谢
i have my project in jenkins, when you build it, it finds the script/cibuild script and executes whatever you have in there. I run the script from my project directory and all is fine, i run the build from jenkins, i get errors? i dont understand?
my script/cibuild script:
#!/bin/sh
# This script file is the entry point to ci.miranetworks.net build/test process.
# It is executed by jenkins, from the root directory
#
echo "1. cd into script "
cd script
echo "2. run createmysqldb test_traffic test_user password"
./createmysqldb test_traffic test_user password
echo "3. cd back into root dir "
cd ..
echo "4. create table with sql with: "
mysql -u test_user --password=password test_traffic < ./phoenix/data/sql/lib.model.schema.sql
export WORKSPACE=phoenix
export SYMFONY=$WORKSPACE/lib/vendor/symfony/lib
(cd $WORKSPACE
echo "6. Clearing the cache"
./symfony cc
echo "7. Run unit test"
./symfony php test/unit/RbcTest.php
)
echo "8. All done and exiting"
exit 0
so when i log onto mysql command with mysql -u test_user --password=password test_traffic it is succesfull then i do GRANT ALL and i also get:
ERROR 1045 (28000): Access denied for user 'test_user'@'localhost' (using password: YES)
although in createmysqldb i do: Q2="GRANT ALL ON . TO '$2'@'localhost' IDENTIFIED BY '$3';"
can anyone explain why i get an access denied?
I have another issue with the same script but want to sort out this one first :)
thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我所知,在 MySQL 中,您需要更改
为
授予对所有表的访问权限?
As far as in MySQL i know you need to change
into
to grant access to all tables ?