After installing mysql, the user name root is displayed when it is completed. When viewing the version on the terminal, it is not root. How can I solve this problem?
滿天的星座
2017-05-18 10:54:07
Terminal $ mysql -v
ERROR 1045 (28000): Access denied for user 'zhangrui'@'localhost' (using password: NO)
How to solve this? Please give me more details. My name is Dabai.
You use
mysql -u 数据库登录名 -p
然后输入你的密码,看可以进入数据库吗?我在我的ubuntu
上使用mysql -v
显示的和你的一样电脑使用者@localhost
。或者使用mysql --version
查看版本。如果使用mysql -V
-V
是大写的V
.Login without adding a user will automatically identify your current system user.
You need mysql -uroot -ppassword to log in. The password uQ>=qkdb was told to you during installation. . This is it