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 ...
sudo mysqld --initialize-insecure
as explained here. – Jos May 27 '17 at 09:04