MySQL is on my localhost. I have set up permissions, but when I open the consol I am automatically logged on as the root user. Is this normal?
I am trying to logon as a different user so I can test the permissions.
| SitePoint Sponsor |
MySQL is on my localhost. I have set up permissions, but when I open the consol I am automatically logged on as the root user. Is this normal?
I am trying to logon as a different user so I can test the permissions.
yes it is normal... if you do not supply the user, host and password arguments, mysql logins with several default values for these arguments
useto login with an account other than the assumed defaults (which is root or in a user login OS, your login userid, a blank password, and localhost)Code:$ mysql -u username -p password -h hostname
This does not work. I get error messages. I think the problem is
$mysql(tech.language(unknown));
I need this in plain english, when I open the consol it automatically comes up with:
mysql>
If I am on "localhost" and my user name is "user" and my password is "password", then I type:
mysql> -h localhost -u user -p password ;
I get an error message. Is something wrong with my configuration or my typing.
is for entering at your shell...Code:$ mysql -u username -p password -h hostname
since when you open your console it's already in mysql (indicated by the mysql> prompt) you can't do that!
how did you open your console in the first place? and well 'console' is not equivalent to the mysql commandline (i was thinking your system console) so please forgive my misunderstanding...
try running mysql.exe at your system commandline instead with the arguments given...
Bookmarks