public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Various questions about 10.1.26-MariaDB on CYGWIN_NT-10.0 2.9.0(0.318/5/3) 2017-09-12 10:18 x86_64 Cygwin
@ 2017-11-06  0:30 Keith Christian
  2017-11-06  6:45 ` Wayne Davison
  0 siblings, 1 reply; 7+ messages in thread
From: Keith Christian @ 2017-11-06  0:30 UTC (permalink / raw)
  To: cygwin

-----
----- Background:
-----

After much trial and error, I installed MariaDB and its mysql client
on the latest Cygwin.

$ mysql_install_db
$ cd '/usr' ; /usr/bin/mysqld_safe --datadir='/var/lib/mysql'
$ mysql
$ mysql -u root -p

Created a 'keithdb' database as the MySQL/MariaDB 'root' user

Also created a 'keith' user and want to add "full" permission TO the
'keithdb' database for this new 'keith' user.

I've tried all of the following grant commands below and none of them
work.  I'm obviously missing something here.  I see that the grant
syntax has changed from older MySQL to MariaDB;




-----
----- Question 1: Could someone help me with the GRANT syntax for
MariaDB 10.1.26?  Even the web pages for MariaDB did not work, so I
must have a fundamental problem.
-----
     1  show grants;
     2  GRANT ALL PRIVILEGES ON keithdb TO 'keith'@'localhost' WITH
GRANT OPTION;
     3  GRANT ALL PRIVILEGES ON 'keithdb 'to 'keith'@'localhost' WITH
GRANT OPTION;
     4  GRANT ALL PRIVILEGES ON 'keithdb' TO 'keith'@'localhost' WITH
GRANT OPTION;
     5  GRANT ALL ON 'keithdb' TO 'keith'@'localhost' WITH GRANT OPTION;
     6  GRANT ALL ON keithdb TO 'keith'@'localhost' WITH GRANT OPTION;
     7  GRANT ALL ON database keithdb TO 'keith'@'localhost' WITH GRANT OPTION;
     8  GRANT ALL 'keith'@'localhost' ON keithdb WITH GRANT OPTION;




-----
----- Question 2:  Why does the login below show "Current user:"
keith@localhost@localhost?  Seems that is should be only
"keith@localhost."
-----
$ mysql -u 'keith'@'localhost'
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 21
Server version: 10.1.26-MariaDB Source distribution

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

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

MariaDB [(none)]> status
--------------
mysql  Ver 15.1 Distrib 10.1.26-MariaDB, for CYGWIN (x86_64) using
EditLine wrapper

Connection id:          21
Current database:
Current user:           keith@localhost@localhost
SSL:                    Not in use
Current pager:          stdout
Using outfile:          ''
Using delimiter:        ;
Server:                 MariaDB
Server version:         10.1.26-MariaDB Source distribution
Protocol version:       10
Connection:             Localhost via UNIX socket
Server characterset:    latin1
Db     characterset:    latin1
Client characterset:    utf8
Conn.  characterset:    utf8
UNIX socket:            /var/run/mysql.sock
Uptime:                 1 day 2 hours 7 min 50 sec

Threads: 1  Questions: 110  Slow queries: 0  Opens: 17  Flush tables:
1  Open tables: 11  Queries per second avg: 0.001
--------------

MariaDB [(none)]> quit
Bye




-----
----- Question 3:  How can I get GNU readline back as the editor for
the mysql client?
-----
Someone else asked this question but the answer appeared difficult.


Thanks for your time and suggestions, Cygwin list folks.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Various questions about 10.1.26-MariaDB on CYGWIN_NT-10.0 2.9.0(0.318/5/3) 2017-09-12 10:18 x86_64 Cygwin
  2017-11-06  0:30 Various questions about 10.1.26-MariaDB on CYGWIN_NT-10.0 2.9.0(0.318/5/3) 2017-09-12 10:18 x86_64 Cygwin Keith Christian
@ 2017-11-06  6:45 ` Wayne Davison
  2017-11-06 13:25   ` Keith Christian
  2017-11-06 19:33   ` Yaakov Selkowitz
  0 siblings, 2 replies; 7+ messages in thread
From: Wayne Davison @ 2017-11-06  6:45 UTC (permalink / raw)
  To: cygwin

On Sun, Nov 5, 2017 at 4:30 PM, Keith Christian wrote:
> $ mysql -u 'keith'@'localhost'

This is where you're messing up. You want to use "mysql -u keith" to
login as the user "keith" -- you're specifying a username with a
host-like suffix.

In the grant commands, the host suffix indicates where the connection
is coming from, and by default (without using the -h option) that
connection is via a localhost unix-domain socket. If you were instead
to use "mysql -u keith -h 127.0.0.1" then you would have a TCP
connection to the localhost IP that you would need to grant permission
for using 'keith'@'127.0.0.1' in a grant command (or you could choose
to use a wildcard of 'keith'@'%' to match any host, at which point you
should specify a "with password" in the grant). So, it is the combo of
the -u name and the -h host that is matched in the grant command's
user@host syntax.

> How can I get GNU readline back as the editor for the mysql client?

That is a compile-time option, so unless we can convince the mariadb
maintainer to switch back to readline, we have to compile our own
mysql client from the mariadb source.

..wayne..

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Various questions about 10.1.26-MariaDB on CYGWIN_NT-10.0 2.9.0(0.318/5/3) 2017-09-12 10:18 x86_64 Cygwin
  2017-11-06  6:45 ` Wayne Davison
@ 2017-11-06 13:25   ` Keith Christian
  2017-11-06 19:33   ` Yaakov Selkowitz
  1 sibling, 0 replies; 7+ messages in thread
From: Keith Christian @ 2017-11-06 13:25 UTC (permalink / raw)
  To: cygwin

Thanks, Wayne.  This should help a great deal.

Keith

>
>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Various questions about 10.1.26-MariaDB on CYGWIN_NT-10.0 2.9.0(0.318/5/3) 2017-09-12 10:18 x86_64 Cygwin
  2017-11-06  6:45 ` Wayne Davison
  2017-11-06 13:25   ` Keith Christian
@ 2017-11-06 19:33   ` Yaakov Selkowitz
  2017-11-06 20:52     ` Keith Christian
  2017-11-06 22:29     ` Wayne Davison
  1 sibling, 2 replies; 7+ messages in thread
From: Yaakov Selkowitz @ 2017-11-06 19:33 UTC (permalink / raw)
  To: cygwin


[-- Attachment #1.1: Type: text/plain, Size: 646 bytes --]

On 2017-11-06 00:44, Wayne Davison wrote:
> On Sun, Nov 5, 2017 at 4:30 PM, Keith Christian wrote:
>> How can I get GNU readline back as the editor for the mysql client?
> 
> That is a compile-time option, so unless we can convince the mariadb
> maintainer to switch back to readline, we have to compile our own
> mysql client from the mariadb source.

Note that Fedora's mariadb uses the system libedit as well.  Could you
be more specific as to what you think is missing, particularly in
comparison to Fedora?

Corinna, maybe it would also help if libedit were updated (the current
upstream release is 20170329)?

-- 
Yaakov


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Various questions about 10.1.26-MariaDB on CYGWIN_NT-10.0 2.9.0(0.318/5/3) 2017-09-12 10:18 x86_64 Cygwin
  2017-11-06 19:33   ` Yaakov Selkowitz
@ 2017-11-06 20:52     ` Keith Christian
  2017-11-06 22:29     ` Wayne Davison
  1 sibling, 0 replies; 7+ messages in thread
From: Keith Christian @ 2017-11-06 20:52 UTC (permalink / raw)
  To: cygwin

On Mon, Nov 6, 2017 at 12:33 PM, Yaakov Selkowitz <yselkowitz@cygwin.com> wrote:
> On 2017-11-06 00:44, Wayne Davison wrote:
>> On Sun, Nov 5, 2017 at 4:30 PM, Keith Christian wrote:
>>> How can I get GNU readline back as the editor for the mysql client?
>>
>> That is a compile-time option, so unless we can convince the mariadb
>> maintainer to switch back to readline, we have to compile our own
>> mysql client from the mariadb source.
>
> Note that Fedora's mariadb uses the system libedit as well.  Could you
> be more specific as to what you think is missing, particularly in
> comparison to Fedora?
>
> Corinna, maybe it would also help if libedit were updated (the current
> upstream release is 20170329)?
>
> --
> Yaakov
>


Yaakov,

Thanks, first time I've encountered "EditLine" in an application.  Not
familiar with it and couldn't find any tutorial info nor man pages so
that I could perform simple searches as with Readline.

If I can find a quick EditLine tutorial, EditLine will be easier to learn.

Keith

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Various questions about 10.1.26-MariaDB on CYGWIN_NT-10.0 2.9.0(0.318/5/3) 2017-09-12 10:18 x86_64 Cygwin
  2017-11-06 19:33   ` Yaakov Selkowitz
  2017-11-06 20:52     ` Keith Christian
@ 2017-11-06 22:29     ` Wayne Davison
  2017-11-07 19:50       ` Keith Christian
  1 sibling, 1 reply; 7+ messages in thread
From: Wayne Davison @ 2017-11-06 22:29 UTC (permalink / raw)
  To: cygwin

On Mon, Nov 6, 2017 at 11:33 AM, Yaakov Selkowitz <yselkowitz@cygwin.com> wrote:
> Could you be more specific as to what you think is missing[?]

I've mentioned the deficiencies on a couple occasions so far, but am
happy to do so again. The biggest problem is a total lack of search
(I've seen mention of Ctrl+R working in libedit, but is not present in
any mariadb release that I've seen). It also does not support more
intricate emacs editing, such as Esc-Y to cycle through older yanks,
Ctrl+Underscore to undo, Esc-dot arg references, not even Ctrl+W word
delete (it does support Esc-Bksp, but it doesn't join multiple
deletions together). Also, while its history file is a really
unreadable format, it is worse that it has a very nasty habit of
destroying all the saved readline history on first libedit use of a
readline history file (no conversion, no nothing).

Since I often have saved commands that I like to reuse in the history
and find them via Ctrl+R, having libedit totally trash all my mysql
history and then ignore all use of Ctrl+R made for a very annoying
update (I compiled a readline version of the client long ago, and had
to restore the history file from backup). It would have been better if
the libedit version had used a unique history file name, or if the
mariadb package scripts had done a backup (and conversion) of a
non-libedit history file.

..wayne..

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Various questions about 10.1.26-MariaDB on CYGWIN_NT-10.0 2.9.0(0.318/5/3) 2017-09-12 10:18 x86_64 Cygwin
  2017-11-06 22:29     ` Wayne Davison
@ 2017-11-07 19:50       ` Keith Christian
  0 siblings, 0 replies; 7+ messages in thread
From: Keith Christian @ 2017-11-07 19:50 UTC (permalink / raw)
  To: cygwin

GRANT syntax issue SOLVED:

Log in to the mysql client as root:


$ mysql -u root -p
Enter password:


MariaDB [keithdb]> use keithdb;
Database changed


MariaDB [keithdb]> grant usage on keithdb.* to 'keith'@'localhost'
with grant option;
Query OK, 0 rows affected (0.00 sec)


Thanks to all who responded!

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-11-07 19:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-06  0:30 Various questions about 10.1.26-MariaDB on CYGWIN_NT-10.0 2.9.0(0.318/5/3) 2017-09-12 10:18 x86_64 Cygwin Keith Christian
2017-11-06  6:45 ` Wayne Davison
2017-11-06 13:25   ` Keith Christian
2017-11-06 19:33   ` Yaakov Selkowitz
2017-11-06 20:52     ` Keith Christian
2017-11-06 22:29     ` Wayne Davison
2017-11-07 19:50       ` Keith Christian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).