I have access to my databases on phpmyadmin and mysql Workbench on my local computer but I have a problem when I try to access the server using Terminal.
Originally, I had uploaded the databases on phpmyadmin. When I utilized Workbench after running new server instance localhost, I had automatic access to my databases. However, when I run mysql command in terminal and show databases, only the default information-schema and test database show up.
Furthermore, when I try to execute the
.sql files to import the database on terminal, I get the following error:
ERROR 1046 (3D000) at line 11: No database selected.
After reading through the documentation, I thought the issue was that I didn't start off the script with
USE Database db_name. I then implemented that in the file and then I got this message in terminal:
ERROR 1044 (42000) at line 7: Access denied for user ''@'localhost' to database 'database'.
If I have access to my databases on phpmyadmin and on Workbench, shouldn't it be the same in terminal?
Also when I first run in terminal
mysql -u admin -p < text-file, it asks me for my password. If I simply press enter, then I receive the aforementioned
ERROR 1046 or ERROR 1044.
If I put in my password, I then receive the following error:
ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: YES).
Can someone please help?