Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #180850 > unrolled thread

Useable guide to first invocation of mariadb - where?

Started byRichard Owlett <rowlett@cloud85.net>
First post2017-05-08 17:10 +0200
Last post2017-05-09 14:40 +0200
Articles 8 — 4 participants

Back to article view | Back to linux.debian.user


Contents

  Useable guide to first invocation of mariadb - where? Richard Owlett <rowlett@cloud85.net> - 2017-05-08 17:10 +0200
    Re: Useable guide to first invocation of mariadb - where? Joe <joe@jretrading.com> - 2017-05-08 19:00 +0200
      Re: Useable guide to first invocation of mariadb - where? Richard Owlett <rowlett@cloud85.net> - 2017-05-08 21:00 +0200
        Re: Useable guide to first invocation of mariadb - where? Richard Owlett <rowlett@cloud85.net> - 2017-05-11 14:40 +0200
          Re: Useable guide to first invocation of mariadb - where? <tomas@tuxteam.de> - 2017-05-11 15:30 +0200
            Re: Useable guide to first invocation of mariadb - where? Richard Owlett <rowlett@cloud85.net> - 2017-05-11 17:00 +0200
    Re: Useable guide to first invocation of mariadb - where? Ric Moore <wayward4now@gmail.com> - 2017-05-08 19:50 +0200
      Re: Useable guide to first invocation of mariadb - where? Richard Owlett <rowlett@cloud85.net> - 2017-05-09 14:40 +0200

#180850 — Useable guide to first invocation of mariadb - where?

FromRichard Owlett <rowlett@cloud85.net>
Date2017-05-08 17:10 +0200
SubjectUseable guide to first invocation of mariadb - where?
Message-ID<tESsp-5wT-11@gated-at.bofh.it>
My eventual goal is to install the Debian version of WordPress on my 
laptop and access it via http://localhost .
I did this with incomplete success. It was unclear if there were 
installation errors or there was a version incompatibility between my 
reference material an my installation. Situation is complicated by not 
having records of how did installation and setup last time.

 >50 years of experience suggested a completely fresh install of 
*EVERYTHING*!

I installed Stretch with MATE desktop.
No problem installing Apache2.
I then did
   apt-get install mariadb-client mariadb-server

As user I (reasonably) see:
richard@stretch-2nd:~$ mariadb
ERROR 1698 (28000): Access denied for user 'richard'@'localhost'

As root I see:
root@stretch-2nd:/home/richard# mariadb
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 10
Server version: 10.1.22-MariaDB- Debian 9.0

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

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

MariaDB [(none)]>

Therefore mariadb was successfully installed.
*BUT* I find *NOTHING* on the web about first run of mariadb!

Random meandering thru the help system yields documentation of "account 
management" on the microscopic details (with links into 
https://mariadb.com/kb/en/mariadb/account-management-sql-commands/ ).

*NO USEFUL OVERVIEW*
I can create users and associated passwords.
But what *VITAL* things will be missing?

I, myself, will be creating any databases. But I do want to know that 
all will be ready for the installation of WordPress to function.

Guidance?
TIA

[toc] | [next] | [standalone]


#180854

FromJoe <joe@jretrading.com>
Date2017-05-08 19:00 +0200
Message-ID<tEUaT-6rk-21@gated-at.bofh.it>
In reply to#180850
On Mon, 8 May 2017 10:06:33 -0500
Richard Owlett <rowlett@cloud85.net> wrote:


> 
> Random meandering thru the help system yields documentation of
> "account management" on the microscopic details (with links into 
> https://mariadb.com/kb/en/mariadb/account-management-sql-commands/ ).
> 
> *NO USEFUL OVERVIEW*
> I can create users and associated passwords.
> But what *VITAL* things will be missing?
> 
> I, myself, will be creating any databases. But I do want to know that 
> all will be ready for the installation of WordPress to function.
> 
> Guidance?

I do not believe it has diverged far from the user interface of mysql,
and it will need to maintain backward compatibility for a while, and
there's plenty of this kind of thing around:

http://www.ntu.edu.sg/home/ehchua/programming/sql/mysql_beginner.html

What should have happened during installation was that you were asked
to create a root password, and it looks as if that happened as you can
talk to it as root. As far as I recall, there shouldn't be anything
else to do. It will have created its own housekeeping databases.

Have a play with the SHOW DATABASES, USE <database>, SHOW TABLES
commands to see what's there.

If you have apache and php running, I'd recommend phpmyadmin as a
fairly painless way to deal with mysql/mariadb.

I know nothing of Wordpress, but in general, if you install an
application which wants to use mysql, it will ask for the mysql root
password in order to create its databases and tables, and will create
any users necessary. After the installation, it will hopefully have
forgotten the root account....

By the way, as a new database user, apart from the identical name (and
therefore the default login if you don't provide a user name on the
command line), the mysql root user has nothing to do with the Linux root
user. It is a separate entity, within mysql. They need not (and
shouldn't) have the same password. Note also what someone else here was
confused about recently, that mysql knows users by both name and client
computer hostname, so richard@comp1 is a different user to
richard@comp2, and different again to richard@localhost and richard@%.
The '%' is the SQL wildcard. As different users, they can have different
privileges and passwords e.g richard@comp1 can use database fred but not
database bill, and richard@localhost can use bill but not fred.
Wordpress will almost certainly name its user(s) 'xxx@localhost', and
that account will not work from anywhere else. I mention this in detail
because it took me a while to get the hang of it.

List the users/hosts with USE mysql; SELECT * FROM user;

Don't mess with user privileges until you understand them, a large
variety of privileges can exist globally, per database, per table and
per column. A user set up by an application will (hopefully) have
exactly the correct set of privileges.

-- 
Joe

[toc] | [prev] | [next] | [standalone]


#180857

FromRichard Owlett <rowlett@cloud85.net>
Date2017-05-08 21:00 +0200
Message-ID<tEW2Z-7Eq-7@gated-at.bofh.it>
In reply to#180854
On 05/08/2017 11:53 AM, Joe wrote:
> On Mon, 8 May 2017 10:06:33 -0500
> Richard Owlett <rowlett@cloud85.net> wrote:
>
>
>>
>> Random meandering thru the help system yields documentation of
>> "account management" on the microscopic details (with links into
>> https://mariadb.com/kb/en/mariadb/account-management-sql-commands/ ).
>>
>> *NO USEFUL OVERVIEW*
>> I can create users and associated passwords.
>> But what *VITAL* things will be missing?
>>
>> I, myself, will be creating any databases. But I do want to know that
>> all will be ready for the installation of WordPress to function.
>>
>> Guidance?
>
> I do not believe it has diverged far from the user interface of mysql,
> and it will need to maintain backward compatibility for a while, and
> there's plenty of this kind of thing around:
>
> http://www.ntu.edu.sg/home/ehchua/programming/sql/mysql_beginner.html

That link doesn't have what I was looking for.
However it links to
http://www.ntu.edu.sg/home/ehchua/programming/sql/MySQL_HowTo.html
which appears.

Also some related pages appear to be a good general source;
http://www.ntu.edu.sg/home/ehchua/programming/index.html

Need a nap before attempting to read with comprehension ;/

>
> What should have happened during installation was that you were asked
> to create a root password, and it looks as if that happened as you can
> talk to it as root. As far as I recall, there shouldn't be anything
> else to do. It will have created its own housekeeping databases.
>
> Have a play with the SHOW DATABASES, USE <database>, SHOW TABLES
> commands to see what's there.
>
> If you have apache and php running, I'd recommend phpmyadmin as a
> fairly painless way to deal with mysql/mariadb.
>
> I know nothing of Wordpress, but in general, if you install an
> application which wants to use mysql, it will ask for the mysql root
> password in order to create its databases and tables, and will create
> any users necessary. After the installation, it will hopefully have
> forgotten the root account....
>
> By the way, as a new database user, apart from the identical name (and
> therefore the default login if you don't provide a user name on the
> command line), the mysql root user has nothing to do with the Linux
> root user. It is a separate entity, within mysql. They need not (and
> shouldn't) have the same password. Note also what someone else here
> was confused about recently, that mysql knows users by both name and
> client computer hostname, so richard@comp1 is a different user to
> richard@comp2, and different again to richard@localhost and richard@%.
> The '%' is the SQL wildcard. As different users, they can have
> different privileges and passwords e.g richard@comp1 can use database
> fred but not database bill, and richard@localhost can use bill but
> not fred.
> Wordpress will almost certainly name its user(s) 'xxx@localhost', and
> that account will not work from anywhere else. I mention this in
> detail because it took me a while to get the hang of it.
>
> List the users/hosts with USE mysql; SELECT * FROM user;
>
> Don't mess with user privileges until you understand them, a large
> variety of privileges can exist globally, per database, per table and
> per column. A user set up by an application will (hopefully) have
> exactly the correct set of privileges.
>

[toc] | [prev] | [next] | [standalone]


#180924

FromRichard Owlett <rowlett@cloud85.net>
Date2017-05-11 14:40 +0200
Message-ID<tFVxT-6it-9@gated-at.bofh.it>
In reply to#180857
On 05/08/2017 01:51 PM, Richard Owlett wrote:
> On 05/08/2017 11:53 AM, Joe wrote:
>> On Mon, 8 May 2017 10:06:33 -0500
>> Richard Owlett <rowlett@cloud85.net> wrote:
>>
>>
>>>
>>> Random meandering thru the help system yields documentation of
>>> "account management" on the microscopic details (with links into
>>> https://mariadb.com/kb/en/mariadb/account-management-sql-commands/ ).
>>>
>>> *NO USEFUL OVERVIEW*
>>> [snip]
>>
>> I do not believe it has diverged far from the user interface of
>> mysql, and it will need to maintain backward compatibility for a
>> while, and there's plenty of this kind of thing around:
>>
>> http://www.ntu.edu.sg/home/ehchua/programming/sql/mysql_beginner.html
>
> That link doesn't have what I was looking for.
> However it links to
> http://www.ntu.edu.sg/home/ehchua/programming/sql/MySQL_HowTo.html
> which appears to.
>

Raised false hopes. It makes the unfounded assumptions that all installs 
go perfectly and thus gives no trouble shooting guidance :{

I've even had a go at purging and reinstalling *NO LUCK*
There have been tantalizing hints on this list that sometimes better 
luck can be had using aptitude or dpkg. Will be re-reading man-pages.

Somewhere I've notes directing output of a command to console and a file 
simultaneously. Then I'll have a record of what does and doesn't happen. 
Tried the 'script' command - output had too may non-ASCII characters in 
output file.

[toc] | [prev] | [next] | [standalone]


#180927

From<tomas@tuxteam.de>
Date2017-05-11 15:30 +0200
Message-ID<tFWki-6O0-15@gated-at.bofh.it>
In reply to#180924
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thu, May 11, 2017 at 07:34:18AM -0500, Richard Owlett wrote:

[...]

No clue about MySQL, sorry.

> Somewhere I've notes directing output of a command to console and a
> file simultaneously. Then I'll have a record of what does and
> doesn't happen. Tried the 'script' command - output had too may
> non-ASCII characters in output file.

This is because script tries to keep everything, ANSI colouring
and cursor movements included. If you just want to "see" what was
going on, you may issue "soelim typescript" or similar. Or pass it
through "less -R", the -R option meaning "go ahead and *interpret*
the escape sequences, I know what I'm doing". Details in the man
pages.

If, OTOH, you want a plain text to store somewhere, you have to
filter out the escape sequences, which is not as trivial as it
sounds (how do you represent an interactive man page viewing as
a "text"?). I'm sure there are tools to help you in that, but
I can't offer any off the top of my head.

If you want to get text in the first place, the command "tee"
might be what you want (but then, if you're doing fancy things,
it might be worse).

I konw it's counterintuitive at first, but once you realize that
"screen" as you see it is somehow a "richer" language than just
a stream of text, the problem becomes clear: when you reduce
"screen" to a stream of text, that's interpretation, and what
you leave out and how becomes a matter of judgement.

Cheers
- -- t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlkUZfsACgkQBcgs9XrR2kYtRwCaAmcQUL76j1OAAeH3RR8X3ewK
OkcAn3f29HTtvKqkJbsHCS77LjPFglkT
=DAus
-----END PGP SIGNATURE-----

[toc] | [prev] | [next] | [standalone]


#180930

FromRichard Owlett <rowlett@cloud85.net>
Date2017-05-11 17:00 +0200
Message-ID<tFXJo-7DY-25@gated-at.bofh.it>
In reply to#180927
On 05/11/2017 08:24 AM, tomas@tuxteam.de wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Thu, May 11, 2017 at 07:34:18AM -0500, Richard Owlett wrote:
>
> [...]
>
> No clue about MySQL, sorry.
>
>> Somewhere I've notes directing output of a command to console and a
>> file simultaneously. Then I'll have a record of what does and
>> doesn't happen. Tried the 'script' command - output had too may
>> non-ASCII characters in output file.
>
> This is because script tries to keep everything, ANSI colouring
> and cursor movements included. If you just want to "see" what was
> going on, you may issue "soelim typescript" or similar. Or pass it
> through "less -R", the -R option meaning "go ahead and *interpret*
> the escape sequences, I know what I'm doing". Details in the man
> pages.

Neither less nor soelim are suitable.

>
> If, OTOH, you want a plain text to store somewhere, you have to
> filter out the escape sequences, which is not as trivial as it
> sounds (how do you represent an interactive man page viewing as
> a "text"?). I'm sure there are tools to help you in that, but
> I can't offer any off the top of my head.
>
> If you want to get text in the first place, the command "tee"
> might be what you want (but then, if you're doing fancy things,
> it might be worse).


I had "tee" in my bookmarks, but its man-page doesn't quite cover my 
case. I suspect it and/or the type of I/O redirection mentioned in 
http://www.tldp.org/LDP/abs/html/io-redirection.html
http://www.tldp.org/LDP/intro-linux/html/sect_05_02.html
was what I used before.

In the mean time I'll use brute force by doing a copy-n-paste from the 
screen every few commands. I've got work to accomplish ;/
thanks

>
> I konw it's counterintuitive at first, but once you realize that
> "screen" as you see it is somehow a "richer" language than just
> a stream of text, the problem becomes clear: when you reduce
> "screen" to a stream of text, that's interpretation, and what
> you leave out and how becomes a matter of judgement.
>
> Cheers
> - -- t
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.12 (GNU/Linux)
>
> iEYEARECAAYFAlkUZfsACgkQBcgs9XrR2kYtRwCaAmcQUL76j1OAAeH3RR8X3ewK
> OkcAn3f29HTtvKqkJbsHCS77LjPFglkT
> =DAus
> -----END PGP SIGNATURE-----
>
>

[toc] | [prev] | [next] | [standalone]


#180855

FromRic Moore <wayward4now@gmail.com>
Date2017-05-08 19:50 +0200
Message-ID<tEUXg-6Yd-13@gated-at.bofh.it>
In reply to#180850
On 05/08/2017 11:06 AM, Richard Owlett wrote:

> I then did
>   apt-get install mariadb-client mariadb-server
>
> As user I (reasonably) see:
> richard@stretch-2nd:~$ mariadb
> ERROR 1698 (28000): Access denied for user 'richard'@'localhost'
>
> As root I see:
> root@stretch-2nd:/home/richard# mariadb
> Welcome to the MariaDB monitor.  Commands end with ; or \g.
> Your MariaDB connection id is 10
> Server version: 10.1.22-MariaDB- Debian 9.0

I have no experience with this database, but you may wish to check 
/etc/group and see if there is a mariadb group to add your user to. When 
trouble shooting with a shotgun, you're bound to get lucky. Ric


-- 
My father, Victor Moore (Vic) used to say:
"There are two Great Sins in the world...
..the Sin of Ignorance, and the Sin of Stupidity.
Only the former may be overcome." R.I.P. Dad.
http://linuxcounter.net/user/44256.html

[toc] | [prev] | [next] | [standalone]


#180877

FromRichard Owlett <rowlett@cloud85.net>
Date2017-05-09 14:40 +0200
Message-ID<tFcAO-1J6-29@gated-at.bofh.it>
In reply to#180855
On 05/08/2017 12:43 PM, Ric Moore wrote:
> On 05/08/2017 11:06 AM, Richard Owlett wrote:
>
>> I then did
>>   apt-get install mariadb-client mariadb-server
>>
>> As user I (reasonably) see:
>> richard@stretch-2nd:~$ mariadb
>> ERROR 1698 (28000): Access denied for user 'richard'@'localhost'
>>
>> As root I see:
>> root@stretch-2nd:/home/richard# mariadb
>> Welcome to the MariaDB monitor.  Commands end with ; or \g.
>> Your MariaDB connection id is 10
>> Server version: 10.1.22-MariaDB- Debian 9.0
>
> I have no experience with this database, but you may wish to check
> /etc/group and see if there is a mariadb group to add your user to.
> When trouble shooting with a shotgun, you're bound to get lucky. Ric
>

But there should be fewer side effects with a targeted approach ;}
There is no "mariadb group", but there is a "mysql group" {reasonable as 
mariadb is supposed to be a drop-in replacement for mysql}.

I'll not attempt a brute force "solution" by editing that file. Too much 
unknown/unknowable collateral damage possible.

The pages Joe pointed me to gives the lay of the land. If I had seen 
them before my first attempt months ago, I probably not be in current 
situation. They don't directly give troubleshooting guidance, it was not 
the intended purpose.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web