The documentation states: Code Listing 3.2: Setting up mysql # rc-update add mysql default # /etc/init.d/mysql start # nano /etc/vpopmail.conf ... The experience is a bit different however: family root # /etc/init.d/mysql start * You dont appear to have the mysql database installed yet. * Please run /usr/bin/mysql_install_db to have this done... family root # /usr/bin/mysql_install_db Preparing db table Preparing host table Preparing user table Preparing func table Preparing tables_priv table Preparing columns_priv table Installing all prepared tables PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! This is done with: /etc/init.d/mysql start (you have to start the server first!) /usr/bin/mysqladmin -u root -h family password 'new-password' /usr/bin/mysqladmin -u root password 'new-password' See the manual for more instructions. Please report any problems with the /usr/bin/mysqlbug script! The latest information about MySQL is available on the web at http://www.mysql.com Support MySQL by buying support/licenses at https://order.mysql.com family root # /etc/init.d/mysql start * Starting mysqld... [ ok ] family root # /usr/bin/mysqladmin -u root password 'new-password' family root # nano /etc/vpopmail.conf vpopmail.conf already appears to have 'secret' changed to vpoppw so no change appears necessary... family root # mysql -p << EOF > create database vpopmail; > use mysql; > grant select, insert, update, delete, create, drop on vpopmail.* to vpopmail@localhost identified by 'vpoppw'; > flush privileges; > EOF Enter password: ****** family root #
added a note saying you should make sure you've already setup mysql ;)
Okay that may be the easier solution for you :), but that doesn't help the person merely trying to emerge vpopmail and picks up mysql as a dependency. So I'm thinking it would make a nice addition to the documentation if there is something hinting at what to do in the event that mysql has _not_ been set up. In fact, this document assumes that mysql was not already setup or why else would it make the suggestion to use rc-update add mysql default? My interest is to expand the documentation and help make it more informative, thus adding value to the experience of maintaining a Gentoo system overall. So I propose we make a note as to how to set up mysql in the event that it was emerged as a dependency, and thus the unexperienced with mysql will still have a trail of breadcrumbs to follow in the event that last note from emerging mysql was barried by the next package? Here's how my suggestion for the qmail(vpopmail)-howto would read: Code Listing 3.2: Setting up mysql If this is your first time running mysql you will need to run the following commands: # rc-update add mysql default # /usr/bin/mysql_install_db # /etc/init.d/mysql start # /usr/bin/mysqladmin -u root password 'new-password' # nano /etc/vpopmail.conf ... By adding those commands in the document, you will be adding confidence to the user by adding a level of confirmation and consistancy with the other documents, and in addition, will make some lives easier by saving them the trouble of having to stop and look around for what to do (as I had to). Yes the documentation is out there (I found it via google), but with just a couple of lines it could have been a much easier task to accomplish. Those who have already setup MySQL, will know they don't have to do those things over again. But, even for those who don't, a simple note to that effect is simple enough as well: "If you have already setup MySQL, you can ignore the following..." Just my .02 cents.
the end of the mysql merge says this: einfo einfo "You might want to run:" einfo "\"ebuild /var/db/pkg/dev-db/${PF}/${PF}.ebuild config\"" einfo "if this is a new install." einfo i'm not about to start reproducing stuff that's contained in the ebuild in the documentation ... that step will pretty much handle everything you just suggested
Except for where it relates to this: PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! This is done with: /etc/init.d/mysql start (you have to start the server first!) /usr/bin/mysqladmin -u root -h localhost password 'new-password' /usr/bin/mysqladmin -u root password 'new-password' As I just discovered, if you set the password using the -h option everything will work, but if you opt to just run the command without the "-h localhost" you will not be able to proceed, and will encounter the errors I wrote about previously. So at a minimum, I would still say this should be articulated as it is not clear, and could lead to someone wasting days trying to figure out why they cannot get their system to work as described in your howto.
Not to mention, if a person emerges vpopmail, all that great documentation you referenced: "the end of the mysql merge says this: einfo einfo "You might want to run:" einfo "\"ebuild /var/db/pkg/dev-db/${PF}/${PF}.ebuild config\"" einfo "if this is a new install." einfo " gets _burried_ as vpopmail begins to emerge!!! Thus a person would never even see it!!! What harm is in adding a couple extra lines to make things easier? Is it that bad of a redundancy that the benefit isn't outweighed by the benefit? I just spent better than eight hours over the last week indulging this principled stand against redundancy. I'm not getting paid for submitting these bug reports. I'm attempting to help improve the life of this community by vollunteering my time in an attempt to save people theirs. Please, if nothing else, put something in there regarding the password issue, because, that WILL break the process if someone get's it wrong, and as it stands, there is nothing pointing that out.
i thought i touched this up ...
added this before the /etc/init.d/mysql start command: If you just emerged mysql for the first time, make sure you run the <i>ebuild <mysql.ebuild> config</i> command and follow the directions before starting the mysql server.