18.06 LTS documentation fails to communicate correct instruction for mysql installation.

Bug #1800189 reported by Jared Ryan Clemence
10
This bug affects 1 person
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'@'localhost'`. Users unfamiliar with Ubuntu will not know what to try to connect to the newly installed server, because no matter what user-password combination they try, they are greeted with the same message.

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://youtu.be/p08xghuzBwc.

Revision history for this message
Robie Basak (racb) wrote :

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.

Revision history for this message
Jared Ryan Clemence (jaredclemence) wrote : Re: [Bug 1800189] Re: 18.06 LTS documentation fails to communicate correct instruction for mysql installation.

Mr. Basak:

The information you share is enlightening. I had no idea that "sudo
mysql" would (by itself)
access the installed service.

I agree. We should add instruction on how to set up a user account so
that the user does not
wrongly infer that root access should be used as a standard practice.

Do you believe that (1) the length of the content in such a new section,
and (2) the fact that
advanced users may want to skip over the section unless necessary,
should warrant the content
being placed on a separate page with a link to "additional information"
placed in the current
installation page?

Or, do you feel that it would be better placed on the page with the
installation and setup instructions?

I'd be willing to help draft the instructions for review by someone more
knowledgeable such as yourself.

Let me know how I can help and whether a separate page should be created
or if content should
be added to the current page.

Kind regards,

Jared Clemence

On 10/29/18 6:46 AM, Robie Basak wrote:
> 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.
>

Revision history for this message
Doug Smythies (dsmythies) wrote :

The way the Ubuntu Serverguide master code is done, it can not be in a separate page. It has to be added to the current content.

It would be great if you want to help. Here is a link to a bit of a "how to";
https://wiki.ubuntu.com/DocumentationTeam/SystemDocumentation/UbuntuServerGuide

description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.