LinuxForum.Fans
Тема

не пускает с паролем. без пароля пускает. mysql

Автор: moshell 5 сообщений 1308 просмотров
#262253

решил поиграться с мускулом. но вот беда маленькая.
вопрос вот в чем
создаю юзера из под рута в самом мускуле.
указываю пароль. юзер создается,
выхожу из mysql
далее захожу уже под новосозданным юзером, но меня не пускает с паролем.
а вот без пароля пускает. что не так?

mysql> create user gu identified by '************';
Query OK, 0 rows affected (0.00 sec)

mysql> exit
Bye
gu@moshell:~$ mysql -u gu -p*************
ERROR 1045 (28000): Access denied for user 'gu'@'localhost' (using password: YES)
gu@moshell:~$ mysql -u gu
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 46
Server version: 5.5.24-4 (Debian)

Copyright (c) 2000, 2011, 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>

#262254

с пустым полем после -р
то же самое

gu@moshell:~$ mysql -u gu -p
Enter password:
ERROR 1045 (28000): Access denied for user 'gu'@'localhost' (using password: YES)
gu@moshell:~$ mysql -u gu -p
Enter password: (тут я пароль не ввожу)
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 48
Server version: 5.5.24-4 (Debian)

Copyright (c) 2000, 2011, 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>

#262255

и еще один вопрос в догонку.
как сделать цветным приглашение mysql>
ибо это удобно

#262326
moshell написал:
решил поиграться с мускулом. но вот беда маленькая.
вопрос вот в чем
создаю юзера из под рута в самом мускуле.
указываю пароль. юзер создается,
выхожу из mysql
далее захожу уже под новосозданным юзером, но меня не пускает с паролем.
а вот без пароля пускает. что не так?

mysql> create user gu identified by '************';
Query OK, 0 rows affected (0.00 sec)

mysql> exit
Bye
gu@moshell:~$ mysql -u gu -p*************
ERROR 1045 (28000): Access denied for user 'gu'@'localhost' (using password: YES)
gu@moshell:~$ mysql -u gu
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 46
Server version: 5.5.24-4 (Debian)

Copyright (c) 2000, 2011, 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>

Может как то так? create user 'gu@localhost' identified by '************';
Или create user 'gu@%' identified by '************';

#266092

в общем как написано в книжке не получилось сделать.
пошел другим путем.
1) создание пользователя без пароля
2) изменение пароля пользователя
3) наделение его полномочиями.

man было читать лень

Войдите или зарегистрируйтесь, чтобы ответить.