how to access Synology's mysql (mariadb) on the command line

2014-08-20 Thread Wybo

My Synology station is on 192.168.178.27,
the database listens to port 3306,
on my FritzBox I forwarded port 3306 to 192.168.178.27,
I /can/ connect to the database on http://192.168.178.27/phpMyAdmin/
But when I try:

mysql --host=192.168.178.27 --password=* --user=wybo

I get:

ERROR 1045 (28000): Access denied for user 'wybo'@'wybo.fritz.box' (using 
password: YES)


What am I doing wrong?
--
Wybo

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: how to access Synology's mysql (mariadb) on the command line

2014-08-20 Thread shawn l.green

Hi Wybo,

On 8/20/2014 3:47 PM, Wybo wrote:

My Synology station is on 192.168.178.27,
the database listens to port 3306,
on my FritzBox I forwarded port 3306 to 192.168.178.27,
I /can/ connect to the database on http://192.168.178.27/phpMyAdmin/
But when I try:

mysql --host=192.168.178.27 --password=* --user=wybo

I get:

ERROR 1045 (28000): Access denied for user 'wybo'@'wybo.fritz.box'
(using password: YES)

What am I doing wrong?


Access is granted only if three parts are correct:
1) the login you are using (wybo)
2) the password for the login
3) the host you are connecting from (wybo.fritz.box) is allows to use 
that account.


It's #3 that most people forget about.  Run this query

SELECT host FROM mysql.user WHERE user='wybo';

If you see a pattern in the results that would match your host's name, 
then you need to compare your password hashes. If you don't know if you 
have a matching host pattern, post the list of host patterns you got 
from the query to the list. We can tell you.


Regards,
--
Shawn Green
MySQL Senior Principal Technical Support Engineer
Oracle USA, Inc. - Hardware and Software, Engineered to Work Together.
Office: Blountville, TN

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: how to access Synology's mysql (mariadb) on the command line

2014-08-20 Thread shawn l.green

Hello Wybo,

I cleansed your reply and cc:'ed the list again to share the answer.

On 8/20/2014 4:24 PM, Wybo wrote:

Hi Shawn,

Thanks for your prompt reply - I suppose I'll have to do that query via
phpMysqlAdmin. When I do that, the only host that appears is localhost.
However, when I browse the user table, I also see %edited%, which is the
hostname of the synology station, see the attached screenshot (%also edited%). 
Does this
mean that I have to add a new entry in this table? If so, can I do that
via phpMysqlAdmin?



Yes, you will need to use your phpMysqlAdmin session to issue an 
appropriate GRANT command so that the 'wybo' user can login from 
'wybo.fritz.box'.


Example -

GRANT the permissions you want to give on *.* to 
'wybo'@'wybo.fritz.box' IDENTIFIED BY 'password goes here in plain text'


Research the GRANT command itself (and the other account management 
commands) to see what else you can do while creating an account or 
adjusting permissions.

http://dev.mysql.com/doc/refman/5.6/en/account-management-sql.html

Examples of the types of host patterns you can use are also in the 
manual, here:

http://dev.mysql.com/doc/refman/5.6/en/account-names.html

Yours,
--
Shawn Green
MySQL Senior Principal Technical Support Engineer
Oracle USA, Inc. - Hardware and Software, Engineered to Work Together.
Office: Blountville, TN

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql



Re: how to access Synology's mysql (mariadb) on the command line

2014-08-20 Thread Wybo

Yes, that worked - thank you very much!

On 2014-08-20 22:51, shawn l.green wrote:

Hello Wybo,

I cleansed your reply and cc:'ed the list again to share the answer.

On 8/20/2014 4:24 PM, Wybo wrote:

Hi Shawn,

Thanks for your prompt reply - I suppose I'll have to do that query via
phpMysqlAdmin. When I do that, the only host that appears is localhost.
However, when I browse the user table, I also see %edited%, which is the
hostname of the synology station, see the attached screenshot (%also edited%). 
Does this
mean that I have to add a new entry in this table? If so, can I do that
via phpMysqlAdmin?



Yes, you will need to use your phpMysqlAdmin session to issue an
appropriate GRANT command so that the 'wybo' user can login from
'wybo.fritz.box'.

Example -

GRANT the permissions you want to give on *.* to
'wybo'@'wybo.fritz.box' IDENTIFIED BY 'password goes here in plain text'



--
Wybo

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql