Mysql 不了解jenkins ci build的工作原理

Mysql 不了解jenkins ci build的工作原理,mysql,bash,continuous-integration,jenkins,Mysql,Bash,Continuous Integration,Jenkins,我在jenkins有我的项目,当你构建它时,它会找到脚本/cibuild脚本并执行你在那里拥有的任何东西。我从我的项目目录运行脚本,一切正常,我从jenkins运行构建,我得到错误?我不明白 我的脚本/构建脚本: #!/bin/sh # This script file is the entry point to ci.miranetworks.net build/test process. # It is executed by jenkins, from the root direct

我在jenkins有我的项目,当你构建它时,它会找到脚本/cibuild脚本并执行你在那里拥有的任何东西。我从我的项目目录运行脚本,一切正常,我从jenkins运行构建,我得到错误?我不明白

我的脚本/构建脚本:

#!/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
尽管在createmysqldb中,我是这样做的:Q2=“在上向由“$3”标识的“$2”@“localhost”授予所有权限;”

有人能解释为什么我被拒绝访问吗? 我对同一个脚本还有另一个问题,但我想先解决这个问题:)


感谢您在MySQL中所做的一切,我知道您需要更改

ALL ON . TO ...
进入


要授予对所有表的访问权限?

oops抱歉,我不知道为什么未显示通配符,但我将其作为“将所有内容都授予星号上的”$2@“localhost”,由“$3”标识;“我的星体不想显示。。。
ALL ON . TO ...
ALL ON .* TO ...