Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
Kea
Kea
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 241
    • Issues 241
    • List
    • Board
    • Labels
    • Milestones
  • Registry
    • Registry
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Commits
  • Issue Boards
  • ISC Open Source Projects
  • KeaKea
  • Issues
  • #319

Closed
Open
Opened Dec 06, 2018 by Vicky Risk@vicky
  • Report abuse
  • New issue
Report abuse New issue

kea-admin / admin-utils.sh ignores the -h --host arg for the database (GH#104)

<This issue was opened on Github as issue #104 by Kroki0815 on Sept 20, 2018>

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.

Assignee
Assign to
Kea1.6
Milestone
Kea1.6
Assign milestone
Time tracking
None
Due date
No due date
0
Labels
None
Assign labels
  • View project labels
Reference: isc-projects/kea#319