| Summary: | dev-db/mysql: offer automated config via password in /root/.my.cnf | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | James Pic <jamespic> |
| Component: | [OLD] Server | Assignee: | Gentoo Linux MySQL bugs team <mysql-bugs> |
| Status: | RESOLVED FIXED | ||
| Severity: | trivial | ||
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
In eclass now. |
emerge --config mysql must be attended by the sysadmin. mysql.eclass function mysql_pkg_config() should try to get the password from the config file. Example: local config="${HOME}/.my.cnf" if [[ -f $config ]] && [[ `grep -q password $config` ]]; then pwd1=`grep password $config | sed -e "s/password=//"` else einfo "Insert a password for the mysql 'root' user" ewarn "Avoid [\"'\\_%] characters in the password" read -rsp " >" pwd1 ; echo einfo "Retype the password" read -rsp " >" pwd2 ; echo if [[ "x$pwd1" != "x$pwd2" ]] ; then die "Passwords are not the same" fi fi Thanks for your time to integrate such a trivial and useful feature. Reproducible: Always Steps to Reproduce: 1. emerge --config mysql 2. 3. Actual Results: Admin must attend to paste the passwords from /root/.my.cnf. Expected Results: Admin can do something else than copy/paste.