0

I am having the following problem. I am trying to create a new schema from workbench but I am getting this.

enter image description here

The connection in mysql through the terminal works fine.

Theodosioss-MacBook-Pro:~ theodosiostziomakas$ mysql -u theo -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 8.0.13 MySQL Community Server - GPL


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

To make sure that I have the correct user

mysql> select current_user();
+----------------+
| current_user() |
+----------------+
| theo@localhost |
+----------------+
1 row in set (0.00 sec)


mysql>

I am typing show grants for 'theo'@'localhost';

+-------------------------------------------------------------+
| Grants for theo@localhost |
+-------------------------------------------------------------+
| GRANT USAGE ON *.* TO `theo`@`localhost` |
| GRANT ALL PRIVILEGES ON `photo_app`.* TO `theo`@`localhost` |
+-------------------------------------------------------------+

Of course I need to change the privileges.

GRANT ALL PRIVILEGES ON *.* TO 'theo'@'localhost';

And get this back

Access denied for user 'theo'@'localhost' (using password: YES)

Any ideas how to fix this problem? I could have deleted mysql, but I am sure there is a solution. The machine I am using Macbook Pro.

Theo
  • 3,099
  • 12
  • 53
  • 94
  • Yes `theo` only has GRANT access on a database called `photo_app` and not on the new database youare trying to create – RiggsFolly Jun 04 '19 at 08:40
  • You need to use the `root` account to add more privileges to `theo`. – Barmar Jun 04 '19 at 08:46
  • @RiggsFolly So how can i change this? – Theo Jun 04 '19 at 08:47
  • Like @Barmar said, you need to use the `root` (SuperUser) account or whichever account has been given the correct privilages to create and grant privilages on new schemas – RiggsFolly Jun 04 '19 at 08:53
  • @RiggsFolly I forgot the root password and need to recover it somehow – Theo Jun 04 '19 at 08:55
  • See [this post](https://stackoverflow.com/questions/29070501/regaining-access-to-lost-mysql-password-for-phpmyadmin-on-wamp/29073563#29073563) or many others you can find with a GOOGLE search on `stackoverflow: recover root password` – RiggsFolly Jun 04 '19 at 08:58
  • Ah you are a Mac user, [so try this answer instead](https://stackoverflow.com/questions/46564719/how-to-recover-mysql-root-password-in-macos) – RiggsFolly Jun 04 '19 at 09:01

0 Answers0