Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • Kea Kea
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 502
    • Issues 502
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 52
    • Merge requests 52
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • ISC Open Source Projects
  • KeaKea
  • Issues
  • #138
Closed
Open
Created Sep 20, 2018 by Thorsten Krohn@kroki0815

kea-admin / admin-utils.sh ignores the -h --host arg for the database

If the mysql-database is not on localhost, upgrade of the database with kea-admin is not possible.

I looked into the code and the problem is in the admin-utils.sh:

mysql_execute() {  
  QUERY=$1  
  shift  
  if [ $# -gt 1 ]; then  
    mysql -N -B "$@" -e "${QUERY}"  
    retcode=$?  
  else  
    mysql -N -B --database="${db_name}" --user="${db_user}" --password="${db_password}" -e "${QUERY}"  
    retcode=$?  
  fi  
  return $retcode  
}  
mysql_execute_script() {  
  file=$1
  shift
  if [ $# -ge 1 ]; then
    mysql -N -B "$@" < "${file}"
    retcode=$?
  else
    mysql -N -B --database="${db_name}" --user="${db_user}" --password="${db_password}" < "${file}"
    retcode=$?
  fi
  return $retcode
}

The mysql lines should look like this:

mysql -N -B --host="${db_host}" --database="${db_name}" --user="${db_user}" --password="${db_password}"

This problem may be also in the other backends.

This bug is in all versions, also in the master-branch.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking