Bug 7443 - Change the mysql commands in the INSTALL.* files
Summary: Change the mysql commands in the INSTALL.* files
Status: CLOSED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: Documentation (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Chris Cormack
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-13 11:56 UTC by Magnus Enger
Modified: 2018-06-04 20:10 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Magnus Enger 2012-01-13 11:56:25 UTC
Currently the instructions in INSTALL.debian, INSTALL.ubuntu and INSTALL.ubuntu.lucid for setting up the database looks like this: 

 103     $ mysqladmin -uroot -p<password> create <kohadatabasename>
 104     $ mysql -uroot -p<password>
 105 
 106     Welcome to the MySQL monitor.  Commands end with ; or \g.
 107     Your MySQL connection id is 22
 108     Server version: 5.0.51a-24 (Debian)
 109 
 110     Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
 111 
 112     mysql> grant all on <kohadatabasename>.* to '<kohadatabaseuser>'@'localhost' identified by '<kohadatabaseuserpassword>';
 113     Query OK, 0 rows affected (0.00 sec)
 114 
 115     mysql> flush privileges;
 116     Query OK, 0 rows affected (0.00 sec)

Speaking as a not overly experienced Linux user, I think this would be slightly easier to understand: 

--------------------------------------------------------

$ mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 22
Server version: 5.0.51a-24 (Debian)

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> create database <kohadatabasename>; 
mysql> grant all on <kohadatabasename>.* to '<kohadatabaseuser>'@'localhost' identified by '<kohadatabaseuserpassword>';
Query OK, 0 rows affected (0.00 sec)
 
mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

--------------------------------------------------------

This would: 
- avoid the constrct -uroot, which might be mistaken for a long option with one dash
- use the mysql command for everything, and not drag mysqladmin into it
- avoid putting the password on the commandline and thence potentially into the output of commands like top and ps, and the bash history file

Opinions?

Not so sure about these:
- INSTALL.fedora7 has "mysql-u root-p" which i assume is a typo for "mysql -u root -p"? 
- INSTALL.opensuse has "mysqladmin -uroot create koha -p" which i think might be re-written in the way i suggest above?
Comment 1 Magnus Enger 2017-08-01 06:11:14 UTC
Bug 17626 removed the INSTALL.* files, so this bug is no longer relevant.