Y
Y
yaslonane2016-10-03 14:38:25
linux
yaslonane, 2016-10-03 14:38:25

How to make that in mysql to come under uchetka of system?

I want that it would be possible to enter mysql under the system account. What would the knot pull up, and not just the same username.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
romy4, 2016-10-03
@romy4

it's called PAM authentication

A
Alexey Sundukov, 2016-10-03
@alekciy

In the $HOME directory, create a .my.cnf file (i.e., the path to it ~/.my.cnf) in which we write the name of the [client] section and then the details for the connection (except for the name of the database):

[[email protected]:~$] cat ~/.my.cnf 
[client]
user=root
password=root
host=localhost

Then you can connect by specifying only the database you need for work:
[[email protected]:~$] mysql test
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1664475
Server version: 5.6.19-1~dotdeb.1 (Debian)

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

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

mysql>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question