How To Install MySQL on Ubuntu 18.04

Step 3 — (Optional) Adjusting User Authentication and Privileges

In Ubuntu systems running MySQL 5.7 (and later versions), the root MySQL user is set to authenticate using the auth_socket plugin by default rather than with a password. This allows for some greater security and usability in many cases, but it can also complicate things when you need to allow an external program (e.g., phpMyAdmin) to access the user.

In order to use a password to connect to MySQL as root, you will need to switch its authentication method from auth_socket to mysql_native_password. To do this, open up the MySQL prompt from your terminal:

  • sudo mysql

Next, check which authentication method each of your MySQL user accounts use with the following command:

  • SELECT user,authentication_string,plugin,host FROM mysql.user;
Output
+------------------+-------------------------------------------+-----------------------+-----------+
| user             | authentication_string                     | plugin                | host      |
+------------------+-------------------------------------------+-----------------------+-----------+
| root             |                                           | auth_socket           | localhost |
| mysql.session    | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE | mysql_native_password | localhost |
| mysql.sys        | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE | mysql_native_password | localhost |
| debian-sys-maint | *CC744277A401A7D25BE1CA89AFF17BF607F876FF | mysql_native_password | localhost |
+------------------+-------------------------------------------+-----------------------+-----------+
4 rows in set (0.00 sec)

In this example, you can see that the root user does in fact authenticate using the auth_socket plugin. To configure the root account to authenticate with a password, run the following ALTER USER command. Be sure to change password to a strong password of your choosing, and note that this command will change the root password you set in Step 2:

  • ALTER USER ‘root’@’localhost’ IDENTIFIED WITH mysql_native_password BY ‘password‘;

Then, run FLUSH PRIVILEGES which tells the server to reload the grant tables and put your new changes into effect:

  • FLUSH PRIVILEGES;

Check the authentication methods employed by each of your users again to confirm that root no longer authenticates using the auth_socket plugin:

  • SELECT user,authentication_string,plugin,host FROM mysql.user;
Output
+------------------+-------------------------------------------+-----------------------+-----------+
| user             | authentication_string                     | plugin                | host      |
+------------------+-------------------------------------------+-----------------------+-----------+
| root             | *3636DACC8616D997782ADD0839F92C1571D6D78F | mysql_native_password | localhost |
| mysql.session    | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE | mysql_native_password | localhost |
| mysql.sys        | *THISISNOTAVALIDPASSWORDTHATCANBEUSEDHERE | mysql_native_password | localhost |
| debian-sys-maint | *CC744277A401A7D25BE1CA89AFF17BF607F876FF | mysql_native_password | localhost |
+------------------+-------------------------------------------+-----------------------+-----------+
4 rows in set (0.00 sec)

You can see in this example output that the root MySQL user now authenticates using a password. Once you confirm this on your own server, you can exit the MySQL shell:

  • exit

Alternatively, some may find that it better suits their workflow to connect to MySQL with a dedicated user. To create such a user, open up the MySQL shell once again:

  • sudo mysql

Note: If you have password authentication enabled for root, as described in the preceding paragraphs, you will need to use a different command to access the MySQL shell. The following will run your MySQL client with regular user privileges, and you will only gain administrator privileges within the database by authenticating:

  • mysql -u root -p

From there, create a new user and give it a strong password:

  • CREATE USER ‘sammy‘@’localhost’ IDENTIFIED BY ‘password‘;

Then, grant your new user the appropriate privileges. For example, you could grant the user privileges to all tables within the database, as well as the power to add, change, and remove user privileges, with this command:

  • GRANT ALL PRIVILEGES ON *.* TO ‘sammy‘@’localhost’ WITH GRANT OPTION;

Note that, at this point, you do not need to run the FLUSH PRIVILEGES command again. This command is only needed when you modify the grant tables using statements like INSERTUPDATE, or DELETE. Because you created a new user, instead of modifying an existing one, FLUSH PRIVILEGES is unnecessary here.

Following this, exit the MySQL shell:

  • exit

Finally, let’s test the MySQL installation.

Source: How To Install MySQL on Ubuntu 18.04 | DigitalOcean

How To Install MySQL on Ubuntu 18.04 was last modified: August 9th, 2020 by Jovan Stosic

Thomas Paine

Thomas Paine (born Thomas Pain) (February 9, 1737 [O.S. January 29, 1736][Note 1] – June 8, 1809) was an English-born American political activist, philosopher, political theorist, and revolutionary. He authored Common Sense (1776) and The American Crisis (1776–1783), the two most influential pamphlets at the start of the American Revolution, and helped inspire the patriots in 1776 to declare independence from Great Britain. His ideas reflected Enlightenment-era ideals of transnational human rights. Historian Saul K. Padover described him as “a corsetmaker by trade, a journalist by profession, and a propagandist by inclination”.

https://en.wikipedia.org/wiki/Thomas_Paine

Thomas Paine was last modified: August 9th, 2020 by Jovan Stosic

Software in the Public Interest

Software in the Public Interest, Inc. (SPI) is a US 501(c)(3) non-profit organization formed to help other organizations create and distribute free/open-source software and open-source hardware. Anyone is eligible to apply for membership, and contributing membership is available to those who participate in the free software community.

SPI was originally created to allow the Debian Project to accept donations. It now acts as a fiscal sponsor to many free and open source projects.

SPI has hosted Wikimedia Foundation board elections and audited the tally as a neutral third party from 2007–2011.

https://en.wikipedia.org/wiki/Software_in_the_Public_Interest

Software in the Public Interest was last modified: August 8th, 2020 by Jovan Stosic

Roger Williams

Roger Williams (c. 21 December 1603 – between 27 January and 15 March 1683) was a Puritan minister, theologian, and author who founded Providence Plantations, which became the Colony of Rhode Island. He was a staunch advocate for religious freedom, separation of church and state, and fair dealings with Native Americans, and he was one of the first abolitionists.

Williams was expelled by the Puritan leaders from the Massachusetts Bay Colony for spreading “new and dangerous ideas”, and he established the Providence Plantations in 1636 as a refuge offering what he called “liberty of conscience“. In 1638, he founded the First Baptist Church in America, also known as the First Baptist Church of Providence. He studied the Native American languages and wrote the first book on the Narragansett language, and he organized the first attempt to prohibit slavery in any of England’s North American colonies.

https://en.wikipedia.org/wiki/Roger_Williams

Roger Williams was last modified: August 7th, 2020 by Jovan Stosic

Alfred the Great

Alfred the Great (848/849 – 26 October 899) was King of Wessex from 871 to 886 and King of the Anglo-Saxons from 886 to 899. He was the youngest son of King Æthelwulf of Wessex. His father died when he was young, and three of Alfred’s brothers, Æthelbald, Æthelberht and Æthelred, reigned in turn before him.

After ascending the throne, Alfred spent several years fighting Viking invasions. He won a decisive victory in the Battle of Edington in 878 and made an agreement with the Vikings, creating what was known as the Danelaw in the North of England. Alfred also oversaw the conversion of Viking leader Guthrum to Christianity. He defended his kingdom against the Viking attempt at conquest, becoming the dominant ruler in England. Details of his life are described in a work by 9th-century Welsh scholar and bishop Asser.

Alfred had a reputation as a learned and merciful man of a gracious and level-headed nature who encouraged education, proposing that primary education be conducted in Anglo-Saxon rather than Latin and improving the legal system and military structure and his people’s quality of life. He was given the epithet “the Great” during and after the Reformation in the sixteenth century, and together with Danish Cnut the Great, is the only king of England to be given such a name

https://en.wikipedia.org/wiki/Alfred_the_Great

Alfred the Great was last modified: August 7th, 2020 by Jovan Stosic

16.04 – How to edit a .odt file from the terminal?

The closest thing to what you’re looking for is wordgrinder, a terminal-based word processor.

You can install it executing:

sudo apt install wordgrinder

Here is the official website of the project: https://cowlark.com/wordgrinder/

This is the Github repo: https://github.com/davidgiven/wordgrinder

And a quick Survival Guide: https://gist.github.com/davidgiven/1aba97e96a9b8f9b573b

If you check the Importing and Exporting sections you will find:

Importing

Imports basic content from ODT files. OpenDocument is complicated and hard to parse but WordGrinder will do its best to apply appropriate styles. Unsupported features are ignored.

Exporting

This produces an ODT file which can be read by LibreOffice and a variety of other major word processors. Character and paragraph styles are exported and are mapped to OpenDocument styles called P, H1, H2 etc.

Source: 16.04 – How to edit a .odt file from the terminal? – Ask Ubuntu

16.04 – How to edit a .odt file from the terminal? was last modified: August 6th, 2020 by Jovan Stosic