Maks00088
@Maks00088
Обучаюсь Java/JavaEE /Php/Js

Ошибка «Not Connected», Как присоединиться?

Всем привет .
Получаю ошибку "Not connected" , не пойму в чем дело , кто сталкивался ?
1. Сервер включен
2. В команд лайне переключился все нормально .

59d78149419b8140491130.png59d78163f295b984161578.png
  • Вопрос задан
  • 1108 просмотров
Решения вопроса 1
Пригласить эксперта
Ответы на вопрос 1
@IamNotStranger
Парни, я новенький. Прошу помощи.

У меня на маке не запускается MySQL и я чего только не пробовал - и МАМР и всё на свете.
После прочтения статьи sqlinfo.ru/articles/info/16.html я выяснил что у меня вот такая ошибка:

ERROR 1045 (28000): Access denied for user ‘kot’@‘localhost' (using password: NO)

Последовл инструкциям, и теперь он меня вообще пускать в MySQL перестал. Вот смотрите ниже что пишет. Помогите пожалуйста!

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 380
Server version: 5.7.19 Homebrew

Copyright (c) 2000, 2017, 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> GRANT ALL PRIVILEGES ON *.* TO monty@localhost
-> -> IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-> IDENTIFIED BY 'some_pass' WITH GRANT OPTION' at line 2
mysql> GRANT ALL PRIVILEGES ON *.* TO monty@localhost
-> -> IDENTIFIED BY 'kots' WITH GRANT OPTION;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-> IDENTIFIED BY 'kots' WITH GRANT OPTION' at line 2
mysql> GRANT ALL PRIVILEGES ON *.* TO kot@localhost
-> IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> GRANT ALL PRIVILEGES ON *.* TO monty@"%"
-> GRANT ALL PRIVILEGES ON *.* TO monty@"%"
-> IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'GRANT ALL PRIVILEGES ON *.* TO monty@"%"
IDENTIFIED BY 'some_pass' WITH GRANT OP' at line 2
mysql> mysql --user=root mysql
-> GRANT ALL PRIVILEGES ON *.* TO monty@localhost
-> IDENTIFIED BY 'some_pass' WITH GRANT OPTION;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysql --user=root mysql
GRANT ALL PRIVILEGES ON *.* TO monty@localhost
IDENTIFIE' at line 1
mysql> cysql> create user 'kot'@'localost' IDENTIFIED BY 'password';
Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL PRIVILEGIES ON * . * TO 'kot'@'localhost';
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'PRIVILEGIES ON * . * TO 'kot'@'localhost'' at line 1
mysql> GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
ERROR 1133 (42000): Can't find any matching row in the user table
mysql> GRANT ALL PRIVILEGES ON * . * TO 'kot'@'localhost';
Query OK, 0 rows affected (0.01 sec)

mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)

mysql> quit
Bye
Mac-New:~ Kot$ mysql -u [kot]-p
ERROR 1045 (28000): Access denied for user '[kot]-p'@'localhost' (using password: NO)
Mac-New:~ Kot$ mysql
ERROR 1045 (28000): Access denied for user 'Kot'@'localhost' (using password: NO)
Mac-New:~ Kot$ mysql
ERROR 1045 (28000): Access denied for user 'Kot'@'localhost' (using password: NO)
Mac-New:~ Kot$ quit
-bash: quit: command not found
Mac-New:~ Kot$ mysql
ERROR 1045 (28000): Access denied for user 'Kot'@'localhost' (using password: NO)
Mac-New:~ Kot$ GRANT [ALL PRIVILEGES] ON [*].[*] TO ‘[kot]’@‘localhost’;
-bash: GRANT: command not found
Mac-New:~ Kot$ mysql
ERROR 1045 (28000): Access denied for user 'Kot'@'localhost' (using password: NO)
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы
23 нояб. 2024, в 01:31
1000 руб./за проект
23 нояб. 2024, в 00:16
2000 руб./за проект
22 нояб. 2024, в 23:55
3000 руб./за проект