0

Newly installed mysql server can only be accessed under the root's # prompt. New databases and users can be created. Records can also be updated without any problems using the default root account under the # prompt.

But when I tried to invoke mysql under the $ prompt using :

mysql -u 'user_name' -p

I get this

ERROR 1045 (28000): Access denied for user 'user_name'@'localhost' (using password: YES)

Have tried to use both the actual host name of the server and 'localhost' as the user's record host field value. The same error comes out.

Hope somebody could offer some suggestions.

update :

I have just tried this link with an answer from Loremhipsum. Now I cannot access mysql even with the root mysql account ...

Stanley
  • 13
  • Reset your database with sudo mysqld --initialize-insecure as explained here. – Jos May 27 '17 at 09:04
  • Thanks @jos for the suggestion. Have tried it this morning, unfortunately it is still not working. The reason could be I have installed MariaDB over the default mysql which came with my ubuntu server installation. Will work on the issue again later today or tomorrow when I have a chance. – Stanley May 29 '17 at 01:35

0 Answers0