在MySQL上以其他用户身份登录 [英] Logging in as a different user on MySQL

查看:1029
本文介绍了在MySQL上以其他用户身份登录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个不同的用户,当我尝试登录mysql时不会允许我.我想我错过了一步.我正在使用Windows7.登录时,它会自动要求我输入密码.如果输入root密码,则可以使用mysql.如果输入为用户创建的密码,则会出现无法读取的错误,程序将退出.我是否需要首先以root用户身份登录,然后以某种方式以新用户身份登录.我很困扰.我用来创建新用户的代码在这里:

I created a different user, when I try to log into mysql it will not let me. I think I am missing a step. I am using windows 7. When I log in it automatically asks me for a password. If I enter the root password I can use mysql. If I enter the password I have created for the user, I get an error I cannot read and the program exits. Do I need to first login as root then somehow log in as new user. I am very confused. The code I used to create the new user is here:

无法以非root用户身份登录mysql

推荐答案

尝试一下:

>> mysql -u USERNAME -p 

按Enter键,系统将提示您输入USERNAME的密码.

Press enter, and you'll be prompted for the password for USERNAME.

这篇关于在MySQL上以其他用户身份登录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆