18.06 LTS documentation fails to communicate correct instruction for mysql installation.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu Server Guide |
New
|
Undecided
|
Unassigned |
Bug Description
The 18.04 LTS guide for mysql installation is incomplete. It lacks important information on how to install mysql in a manner that makes it function well. Another bug has been reported regarding the bind-address issue, so this bug report will only address the `ERROR 1698 (28000)` issue.
PROBLEM
========
After running `sudo apt-get install mysql-server`, the system never prompts for a root password. Users familiar with Ubuntu will attempt to login using `mysql -u root -p`, and they will see `ERROR 1698 (28000): Access denied for user 'root'@
SOLUTION
========
To remedy the problem, add a section to the user guide about "Connecting to Mysql Server." In the section, note that to log into mysql for the first time that the user must use the command `sudo mysql -u root -p`, and the user must use a blank password by default.
By adding this section, new users (and veterans) will understand that the default access is restricted to the 'root' user account (sudo), the default mysql user is 'root', and the default password is ''.
Credit to the solution goes to the following You Tube Video Link, which I found after dealing with this issue over 24-hours of frustration: https:/
Thank you for taking the time to report this bug and helping to make Ubuntu better.
It's a reasonable point that the guide doesn't currently cover how users can connect an SQL monitor to the default installed MySQL server package, and I welcome the addition you suggest, with one minor modification: "sudo mysql" is all that is required; "-u root" and "-p" are unnecessary.
It's not that the user must use a blank password. It's that no password is required when the user is running the client as Unix root because the server is able to detect that and doesn't require a password prompt to authenticate in that case. This is why there is no default password set by default now. And "root" is the default since the sudo means that the mysql client is running as root.
If we add this section, it might be wise to also add a section explaining how to create a database and a user to access this database - so that users don't get misled into thinking that regular database access should be done via "sudo". I wonder whether we should add the "Accessing" part without also adding this "Setting up manually for regular use" part to ensure this.