Tuesday, December 3, 2019

Drupal 7 - How To Install, Enable and Configure Draggable CAPTCHA

CentOS 7 / Drupal 7


How To Install, Enable and Configure Draggable CAPTCHA









# cd sites/all/modules/
# wget https://ftp.drupal.org/files/projects/draggable_captcha-7.x-1.2.tar.gz
--2019-12-04 12:40:50--  https://ftp.drupal.org/files/projects/draggable_captcha-7.x-1.2.tar.gz
Resolving ftp.drupal.org (ftp.drupal.org)... 151.101.2.217, 151.101.66.217, 151.101.130.217, ...
Connecting to ftp.drupal.org (ftp.drupal.org)|151.101.2.217|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 73408 (72K) [application/octet-stream]
Saving to: ‘draggable_captcha-7.x-1.2.tar.gz’

100%[==========================================================================================================================================================================================>] 73,408      --.-K/s   in 0.004s

2019-12-04 12:40:51 (16.2 MB/s) - ‘draggable_captcha-7.x-1.2.tar.gz’ saved [73408/73408]

# tar -zxvf draggable_captcha-7.x-1.2.tar.gz
draggable_captcha/
draggable_captcha/draggable-captcha-mini.tpl.php
draggable_captcha/draggable_captcha.info
draggable_captcha/css/
draggable_captcha/css/draggable-styles.css
draggable_captcha/css/images/
draggable_captcha/css/images/bwm-captcha.png
draggable_captcha/css/images/blank.gif
draggable_captcha/css/images/bwm-captcha-mini.png
draggable_captcha/css/iepngfix.htc
draggable_captcha/css/styles-mini.css
draggable_captcha/README.txt
draggable_captcha/js/
draggable_captcha/js/draggable_captcha.js
draggable_captcha/js/draggable_captcha_mini.js
draggable_captcha/draggable_captcha.module
draggable_captcha/LICENSE.txt

draggable_captcha/draggable-captcha.tpl.php


Then, click on Save configuration.





Then, click on Save configuration.



Great Success!


REFERENCES


https://www.drupal.org/project/draggable_captcha




Monday, December 2, 2019

Drupal 8 - How To Add A Poll To A Drupal 8 Website

CentOS 7 / Drupal 8


How To Add A Poll To A Drupal 8 Website


The MMTM YouTube Channel is a powerful way to engage with people - but it doesn't go far enough!  We think an important strategy for building up a sustainable Subscribers base for My Man The Maker involves encouraging the existing Subscribers of other websites, like YouTube, to also Subscribe directly to mymanthemaker.com.  Of course, the overarching intention is to convert YouTube Subscribers into direct MMTM customers, with nobody in between - no matter how excellent they or their services may be.  Times can change, and without a direct connection to its own Subscribers and Customers, MMTM would always have a weakness.  A disruption to that 3rd party, planned or otherwise, could really hurt MMTM, perhaps fatally.


So, how can you go about attracting people from popular social media sites to your own website?  One time-proven way of increasing a connection with Subscribers is to increase interaction via Contests and Polls.  One of the easiest contests to run is a Poll, where you pose a question and then let people weigh in on what option (which you also provide) is their preferred choice.

Now, Drupal has featured Polls for as long as I can remember - at least since Drupal 6 - but I have never had occasion to use it.  Well, that situation has now changed!  I now urgently need to be able to run Polls for the purpose of rewarding people who came over from YouTube (or wherever else) to www.mymanthemaker.com so they could give their opinions and maybe win something.  In return, I am prepared to (maybe) give them a reward - via some kind of giveaway contest.  Also, while they are visiting the mymanthemaker.com website, I can do everything I can to convince them to buy something from its online store!

Polls on YouTube are called Cards, and they are a very powerful and popular way of engaging with people on YouTube.  The only problem is that when you use a YouTube Poll,. you only get limited flexibility and you lose the ability to do things with the user that YouTube may not have (or may never) implement.

First I needed to set the stage on YouTube, so what I did was mention the Poll live (in the video) as well as in the video description.  The video description featured a clear call to action for people to Subscribe to my YouTube channel, and then go over to mymanthemaker.com, register there as well and then vote in a Poll to have a chance to win!


Once I was done with YouTube, the next thing I needed to do was to extend the user definition in Drupal 8 by adding a custom field, YouTube Name to the user type.  

This is explained in great detail in another article entitled How To Add A Custom Field To Drupal 8's Create New Account Screen.  

The next piece of the puzzle was to install and enable a poll in Drupal 8.  The Poll Module for Drupal 8 is available at www.drupal.org, and here's an Overview and Features of the Drupal Poll Module:


Here's some Project information regarding the Drupal Poll Module:


Installing the Poll Module was quite simple and easy:  I just right-clicked on the tar.gz (41.25 KB) link in the Project Information area, copied the link address and then navigated to my Linux CLI and did the following:

# pwd
<drupal_root>/sites/all/modules

NOTE:  <drupal_root> is just a place holder for your location in the file system!

# wget https://ftp.drupal.org/files/projects/poll-8.x-1.3.tar.gz
--2019-12-02 19:09:03--  https://ftp.drupal.org/files/projects/poll-8.x-1.3.tar.gz
Resolving ftp.drupal.org (ftp.drupal.org)... 151.101.2.217, 151.101.66.217, 151.101.130.217, ...
Connecting to ftp.drupal.org (ftp.drupal.org)|151.101.2.217|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 42235 (41K) [application/octet-stream]
Saving to: ‘poll-8.x-1.3.tar.gz.1’

100%[======================================>] 42,235      --.-K/s   in 0.003s

2019-12-02 19:09:03 (11.8 MB/s) - ‘poll-8.x-1.3.tar.gz.1’ saved [42235/42235]

# tar -zxvf poll-8.x-1.3.tar.gz
poll/
poll/README.md
poll/config/
poll/config/install/
poll/config/install/core.entity_view_mode.poll.teaser.yml
poll/config/install/views.view.poll_admin.yml
poll/config/install/views.view.poll_list.yml
poll/css/
poll/css/poll.base-rtl.css
poll/css/poll.base.css
poll/css/poll.theme-rtl.css
poll/css/poll.theme.css
poll/js/
poll/js/poll.admin.js
poll/poll.info.yml
poll/poll.install
poll/poll.libraries.yml
poll/poll.links.action.yml
poll/poll.links.menu.yml
poll/poll.links.task.yml
poll/poll.module
poll/poll.permissions.yml
poll/poll.routing.yml
poll/poll.services.yml
poll/poll.tokens.inc
poll/src/
poll/src/Controller/
poll/src/Controller/PollController.php
poll/src/Entity/
poll/src/Entity/Poll.php
poll/src/Entity/PollChoice.php
poll/src/Form/
poll/src/Form/PollDeleteForm.php
poll/src/Form/PollForm.php
poll/src/Form/PollItemsDeleteForm.php
poll/src/Form/PollSettingsForm.php
poll/src/Form/PollViewForm.php
poll/src/Form/PollVoteDeleteForm.php
poll/src/Plugin/
poll/src/Plugin/Block/
poll/src/Plugin/Block/PollRecentBlock.php
poll/src/Plugin/Field/
poll/src/Plugin/Field/FieldWidget/
poll/src/Plugin/Field/FieldWidget/PollChoiceDefaultWidget.php
poll/src/Plugin/views/
poll/src/Plugin/views/field/
poll/src/Plugin/views/field/PollStatus.php
poll/src/Plugin/views/field/PollTotalVotes.php
poll/src/PollAccessControlHandler.php
poll/src/PollChoiceInterface.php
poll/src/PollChoiceTranslationHandler.php
poll/src/PollChoiceTranslationMetadataWrapper.php
poll/src/PollInterface.php
poll/src/PollListBuilder.php
poll/src/PollPostRenderCache.php
poll/src/PollStorage.php
poll/src/PollStorageInterface.php
poll/src/PollViewBuilder.php
poll/src/PollViewData.php
poll/src/PollVoteStorage.php
poll/src/PollVoteStorageInterface.php
poll/templates/
poll/templates/poll-meter.html.twig
poll/templates/poll-results.html.twig
poll/templates/poll-vote.html.twig
poll/tests/
poll/tests/src/
poll/tests/src/Functional/
poll/tests/src/Functional/PollBlockTest.php
poll/tests/src/Functional/PollCreateTest.php
poll/tests/src/Functional/PollDeleteChoiceTest.php
poll/tests/src/Functional/PollExpirationTest.php
poll/tests/src/Functional/PollFieldTest.php
poll/tests/src/Functional/PollFieldUITest.php
poll/tests/src/Functional/PollHtmlSpecialCharactersTest.php
poll/tests/src/Functional/PollListTest.php
poll/tests/src/Functional/PollTestBase.php
poll/tests/src/Functional/PollTokenReplaceTest.php
poll/tests/src/Functional/PollViewTest.php
poll/tests/src/Functional/PollVoteCheckHostnameTest.php
poll/tests/src/Functional/PollVoteMultilingualTest.php
poll/tests/src/Functional/PollVoteTest.php
poll/tests/src/FunctionalJavascript/
poll/tests/src/FunctionalJavascript/PollVoteJavascriptTest.php
poll/LICENSE.txt

With the Poll Module installed, I then used the Drupal 8 Administrator GUI to enable the module, by selecting it and then clicking on Install:


Once the Poll Module is was installed and enabled, a new content option (Polls), appeared in the Content area of the Drupal 8 Administrator GUI:


When I clicked on Polls, it led to an area where you can Add a poll:


I then used the provided form to construct a Poll regarding the Helmet Poll I wanted to run for a project I am working on, EZ-RIDER:


When I was finished, I clicked on SAVE.  

With the Poll constructed, I next needed to figure out where to show the Poll to my Authenticated users.  I figured the LEFT SIDEBAR would be a good place for that, so I navigated to HOME -> Administration -> Structure -> Block layout and decided to put the Most recent poll in Sidebar First.  

Considering that there is only one Poll at the moment, that seemed like a reasonable choice.


Finally, I wanted only Authenticated users, i.e. people who had gone through the Create an account process of www.mymanthemaker.com to be able to see the poll and vote, so I had to go to the area of the Drupal Administrative GUI that controlled Poll visibility and adjust the permissions accordingly:


Once I was in the right place, I adjusted the permissions so that only Authenticated users could see the Poll:


OK, with all of that done...time for some testing!

Will the poll show NOT show up for an Anonymous user?


Success!...but not quite finished yet...

Will the Poll I just created show up for an Authenticated user, like my test user?




REFERENCES:

https://www.drupal.org/project/poll

https://www.drupal.org/project/pollfield/issues/714924



Sunday, December 1, 2019

Drupal 8 - How To Add A Custom Field To Drupal 8's Create New Account Screen

CentOS 7 / Drupal 8


How To Add A Custom Field To Drupal 8's Create New Account Screen


One of the things that I would dearly love to do with my growing Tube Creator Channel (MY MAN THE MAKER) is to have the ability to give away prizes to my YouTube Subscribers via Contests and Polls.  

YouTube has a poll feature, but it doesn't do exactly what I want (encourage people to double-register at both YouTube and mymanthemaker.com, so I can increase engagement).  Now, polls have been a feature of Drupal for a very long time, since at least Drupal 6, but I have never had occasion to use them...until now!  

But before I can start giving away free prizes at mymanthemaker.com, I to put a means in place that ensures that whatever winner(s) get chosen, they are among my current YouTube Subscribers.  Part of setting up this functionality is to ask people what their YouTube Name is, as they are creating their new account at mymanthemaker.com.

Currently, the Create new account screen at mymanthemaker looks like this:


What I wanted to do was to add a custom field to the Create new account screen to people could suppy their YouTube Name at the time of account creation.

Turns out this task is fairly easy, and here's how I did it:

First I navigated to the Home -> Administration -> Configuration -> People area of the Drupal 8 Administration GUI, and then I clicked on Manage fields:


Next, I clicked on Add field:



Next, I Iselected Text (plain) as the field type and gave the field a meaningful name.  In my case, I chose to call the new field YouTube Name:



Next, I supplied some information about the the field, such as its Maximum length, and Allowed number of values.  In my case, I accepted the defaults:


Next, I provided some settings information for the new YouTube Name field, in particular I wrote Help Text that (I hope) explains the presence of this new field in the registration page:


Once I had finished supplying the information I clicked on Save settings.  I was then presented with these results:



Everything looked great!

I next navigated to www.mymanthemaker.com and clicked on Login



Strangely, in this website and maybe in Drupal in generatl, the Create new account functionality is hiding behind the Login feature, something that I always thought should be separate from one another because it is a slightly confusing place for such functionality to be lurking.

Next I clicked on Create New Account in the Login screen:



Now the mymanthemaker.com new user registration page looked like this:




REFERENCES:



Tuesday, November 19, 2019

Drupal 8 - How to Successfully Install Drupal 8 on CentOS 7 With All Errors Resolved

Drupal 8 / CentOS 7



How to Successfully Install Drupal 8 on CentOS 7 With All Errors Resolved


First, go to https://www.drupal.org/download to access the latest version of Drupal Core:




I clicked on read release notes to best orient myself with this version of Drupal.

At the time of this writing, the latest production version of Drupal was 8.7.10:



1)  I right-clicked download tar.gz
2)  I selected Copy link address 
3)  I selected my CentOS console window
4)  I navigated to the appropriate directory on my CentOS server
4)  I typed in wget 
5)  I right-clicked to paste the copied link address
6)  I pressed <ENTER> to download the archive to my CentOS server
7)  I used tar to unpack the archive
8)  I re-named the archive to the right directory name for the apache web server
9)  I used a web browser to navigate to the home page of the Drupal website


Choose Language:

The first screen you see is the Choose language screen:




I accepted English as my language and clicked on Save and continue.


Choose Profile Screen:

The second screen you see is the Select an installation profile screen




I accepted Standard as my installation profile and clicked on Save and continue.

So far, so good, but we are soon going to see silly installation errors that have persisted in Drupal for over 10 years now, and that a simple post-installation script would resolve and ease the lives of thousands and thousands of Drupal newbies.

Instead, the Drupal Team admits the problem and forced Drupal newbies to troll the Internet for hours searching for solutions to problems that should have been programmed away!




Galactic FAIL

Anyways, here we go, into error-land!

How To Resolve FILE SYSTEM Errors When Installing Drupal 8 On CentOS:




For some mysterious reason there's no sites/default/files directory installed on a default Drupal 8 installation - even though almost every Drupal installation in the world needs this directory!  In fact, this directory has been required by Drupal since version 6, which came out in February 2008!

Almost 12 years later, thousands of Drupal newcomers are being stymied by this bad design/deployment decision on the part of the Drupal Core team.

Anyways, getting rid of this error (by creating and configuring this directory) is very simple:

1)  the /sites/default/files directory needs to be manually created

2)  Its ownership needs to be set to the web server process, because that is where Drupal puts files that you upload through the GUI, which runs in the security context of the web server (FYI: my web server security context is apache)

3)  It needs to be set to SELINUX read/write mode (
rw), because the default mode for web content under SELINUX is read-only (r).

Here's the commands that accomplish this task:

# cd sites/default
# mkdir files
# chown apache:apache ./files
# chcon unconfined_u:object_r:httpd_sys_rw_content_t:s0 files

Checking to see if we have resolved the problem (by pressing F5 to reload the Drupal install progress web page) reveals...


WOW!  The error went away!  Great!

How To Resolve settings.php Errors When Installing Drupal 8 On CentOS:



The next error that people are likely to see is with respect to the settings.php file, which Drupal needs to be able to find to function correctly, because that's where it stores its database connection settings and other important information

Thankfully, there's a little more help here than in the case of the files subdirectory, in the form of an example default.settings.php file that you can just copy and use:

# ls -1
default.services.yml
default.settings.php

files

NOT SO FAST!  If you copy this file and expect Drupal 8 to "just work" you are going to be sorely disappointed, because it will be under the wrong user context for the Drupal GUI, which runs as apache:

# whoami
root
# cp default.settings.php settings.php

# ls -l

total 72

-rw-r--r--. 1 mymanthemaker.com mymanthemaker.com  6762 Nov 14 07:20 default.services.yml

-rw-r--r--. 1 mymanthemaker.com mymanthemaker.com 31342 Nov 14 07:20 default.settings.php

drwxr-xr-x. 2 apache            apache                6 Nov 20 10:48 files

-rw-r--r--. 1 root              root              31342 Nov 20 11:34 settings.php


What you will see is the following error, which does not really help to point to what needs to be done to resolve the situation:



At this point a lot of people who don't understand Unix/Linux filesystems throw up their hands and just set the settings.php file to 777 or "world readable and world writeable".

Generally speaking this is a bad idea, because it opens up a huge security hole.

Also, in the case of CentOS, it may not solve your problem.  Remeber, in CentOS the following should always be observed to protect system integrity:

A)  Directories and Files should be owned by the most appropriate security context / user
B)  Directory and File permissions should be loosened as little as possible
C)  SELINUX permissions should be loosened as little as possible

This "Trinity of Principles" should always be on your mind if you are running a CentOS server:

OK - lets totally open up settings.php to see what happens:

Please don't do this!

Read the next section, Here's a better way, to do this the right way!

The next section is included only for EDUCATIONAL purposes, as a WARNING!

# chmod 777 settings.php
# ls -lZ
-rw-r--r--. mymanthemaker.com mymanthemaker.com unconfined_u:object_r:httpd_sys_content_t:s0 default.services.yml
-rw-r--r--. mymanthemaker.com mymanthemaker.com unconfined_u:object_r:httpd_sys_content_t:s0 default.settings.php
drwxr-xr-x. apache            apache            unconfined_u:object_r:httpd_sys_rw_content_t:s0 files
-rwxrwxrwx. root              root              unconfined_u:object_r:httpd_sys_rw_content_t:s0 settings.php

Checking to see if we have resolved the problem (by pressing F5 to reload the Drupal install progress web page) reveals...

WOW!  The error went away!  Great!

Not great.  What you've just done is leave a HOLE in your Linux security model that might come back to bite you later!  Now, there's a possibility that someone could hack your system by messing with the settings.php file, because it's owned by the wrong user (root), has read/write permissions and is executable within the security context of the superuser, root.

The Bottom Line Is This:  Don't Use 777 To Get Things Working!  It's Dangerous!

Here's a better way:

Here's a much more elegant and safe way to get your Drupal 8 settings.php file installed and working correctly under CentOS.

# cp default.settings.php settings.php
# chown apache:apache settings.php
# chmod 446 settings.php
# chcon unconfined_u:object_r:httpd_sys_rw_content_t:s0 settings.php
# ls -lZ
-rw-r--r--. mymanthemaker.com mymanthemaker.com unconfined_u:object_r:httpd_sys_content_t:s0 default.services.yml
-rw-r--r--. mymanthemaker.com mymanthemaker.com unconfined_u:object_r:httpd_sys_content_t:s0 default.settings.php
drwxr-xr-x. apache            apache            unconfined_u:object_r:httpd_sys_rw_content_t:s0 files
-r--r--rw-. apache            apache            unconfined_u:object_r:httpd_sys_rw_content_t:s0 settings.php

Now, checking to see if we have resolved the problem (by pressing F5 to reload the Drupal install progress web page) reveals...

WOW!  The error went away!  Great!

Yes, that's great.  And done in a much, much safer way!

How To Resolve Clean URLs Warning When Installing Drupal 8 On CentOS:



The next bit of work is necessary to enable Clean URLs in Drupal, which is a convenient feature that re-writes Drupal web page address to something humans understand better.

Here's the Drupal explanation:



If you want to learn more about Clean URLs, see the Wikipedia article for more information.

Most people will want this functionality (I know I do), so we we are going to make this error go away.  Trouble is, fixing this error will  almost certainly require us to leave the context of Configuring Drupal and enter the context of Configuring Apache, without any preparation or warning!

To make Clean URLs happen, we need to tell the Apache Web Server to "rewrite" both incoming and outgoing URLs.  This doesn't happen inside of Drupal, it happens one layer below Drupal, inside Apache.

There's two ways of making this happen:

A) Make sure the .htaccess file in the directory of this Drupal 8 installation on CentOS has been configured to enable CLEAN URLs (rewriting), which would limit the impact of this modification to this installation only.

B)  Change the configuration of the Apache server, which could impact every website hosted on this server.

Using the CentOS "Trinity of Principle", let's go for the smallest change possible first, which means taking a look to see if there is an .htaccess file:

#cd /var/www/vhosts/mymanthemaker.com/www/content
# ls -al .htaccess

-rw-r--r--. 1 mymanthemaker.com mymanthemaker.com 7866 Nov 14 07:20 .htaccess

OK, the file exists, but is apache configured to read the .htaccess file at all?  



The place where this needs to be checked is inside the apache server configuration file, which is located far, far away from where the Drupal 8 installation is located.  A specific stanza needs to be added to the 


# vi /etc/httpd/conf.d/vhosts.conf

###############################################################################
# GL  2019-11-19  mymanthemaker.com
###############################################################################
<VirtualHost *:80>

  ServerName    www.mymanthemaker.com
  ServerAlias   mymanthemaker.com
  DocumentRoot  /var/www/vhosts/mymanthemaker.com/www/content
  CustomLog     /var/www/vhosts/mymanthemaker.com/www/logs/access_log common
  ErrorLog      /var/www/vhosts/mymanthemaker.com/www/logs/error_log
  Alias         /webalizer /var/www/vhosts/mymanthemaker.com/www/webalizer

  # This setting is necessary for CLEAN URL's in Drupal
  <Directory "/var/www/vhosts/mymanthemaker.com/www/content">
    AllowOverride All
  </Directory>

</VirtualHost>

Next, we need to get the apache server to re-load its configuration file by asking it to restart:

NOTE:  For barely acceptable reasons, the actual name of the apache server service in CentOS is httpd (don't ask why - I'll just go off on another rant).

# service httpd restart
Redirecting to /bin/systemctl restart httpd.service

Checking to see if we have resolved the problem (by pressing F5 to reload the web page) reveals...

WOW!  The error went away!  Great!


How To Resolve MySQL Errors When Installing Drupal 8 On CentOS:

The next big challenge when overcoming Drupal 8 Installation Problems On A CentOS Server is to connect Drupal to a database.  In my case, it's always been a MySQL Server database, and I have had good results with that database technology.

Here's the screen I got:



So I filled it in with my preferred values and clicked on Save and continue:




Here's what I got in response:





HUH?
Here's what the Drupal 8 Installation script wants to know: 


A) Is the database server running?


OK, let's check.  

On CentOS the MySQL Server is now named "Maria" due to trademark action on the part of Oracle, so to check to see if "MySQL" is running we need to restart the mariadb service:


# service mariadb status
Redirecting to /bin/systemctl status mariadb.service
● mariadb.service - MariaDB database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
   Active: active (running) since Sun 2019-10-06 12:59:55 HKT; 1 months 14 days ago


OK, MySQL is loaded and active, so that potential problem isn't relevant.

B) Does the database exist

Doesn't simply supplying the desired database name would get Drupal to create it?

NOPE.

As it turns out, you have to create the back-end database for Drupal 8 manually, as I have had to do with every version of Drupal for almost 10 years.  Why the Drupal Team insists on inflicting this task on Drupal newcomers I have no clue, as it is one of the most anti-social behaviours I have ever seen persist in the open source community.

Amending the Drupal 8 installation script to include the creation of the MySQL (or whatever) back-end database shouldn't take 10 years to NOT accomplish, when doing so would dramatically increase the adoption rate of Drupal in the face of much friendlier sytems!

So, it turns out that you have to Exit or Suspend the Drupal 8 Installation so as to go and create a database for Drupal 8 to then be able to connect to be able to proceed with its own installation.

Celestial FAIL

Anyways, here's how to create a MySQL back end database so Drupal 8 can install itself:

Installing a MySQL Back End Database for Drupal 8 On CentOS

The things you need are:

1)  The username of the MySQL administrative account
2)  The password of the MySQL administrative account
3)  A name for your Drupal 8 database
4)  A Drupal 8 username for the Drupal 8 database
5)  A password for the Drupal 8 username

Here's what I used to Install A MySQL Database Back End for Drupal 8 On CentOS

MySQL User:     <my secret>
MySQL Pass:     <my secret>
Drupal 8 Data:  mymanthemaker
Drupal 8 User:  themaker
Drupal 8 Pass:  <my secret> 

Note:  In the above example "<my secret>" is a value you make up, not a literal value.

01 - Log in to MySQL as the MySQL Administrator

# mysql -p
Enter password: <my secret>
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 39648
Server version: 5.5.64-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [mysql]> use mysql;
Database changed

02 - Create the Drupal 8 Database


Now that the MySQL database server command line interface (MCLI) has been accessed, we can go ahead and Create A Drupal 8 Back End Database Under CentOS:

MariaDB [(none)]> CREATE DATABASE mymanthemaker CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
Query OK, 1 row affected (0.00 sec)


03 - Create the Drupal 8 User (with Password)

MariaDB [(none)]> CREATE USER themaker@localhost IDENTIFIED BY '<my secret>';

Query OK, 0 rows affected (0.05 sec)

04 - Grant Drupal 8 User Access to the Drupal 8 Database


MariaDB [(none)]> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES ON mymanthemaker.* to themaker@localhost;
Query OK, 0 rows affected (0.01 sec)

Checking to see if we have resolved the problem (by pressing F5 to reload the web page) reveals...


WOW!  The error went away!  Great!

If things go well, you should see a progress bar sliding to the right, showing what Drupal 8 modules are being installed:





How To Configure Drupal 8 On CentOS:


Once the modules are filled, you will be asked to provide some basic information about your new Drupal 8 site.

Here's my screen(s) as an example:



Next, click on Save and continue...

Here's what I saw next:



Great Success!



REFERENCES:

https://www.drupal.org

https://www.drupal.org/download

https://www.drupal.org/docs/8/troubleshooting-drupal-8/fix-drupal-8-clean-urls-problems

https://www.drupal.org/docs/8/install/step-3-create-a-database