在MySQL中作为特定用户进行身份验证 [英] Authenticate as a specific user in MySQL
问题描述
我是一个全新的用户到MySQL数据库,已安装WAMPSERVER和我通过MySQL控制台使用MySQL。
Query_1:每次登录时,它都会直接询问root的密码。但是,我想以不同的用户身份登录。
Query_2:如果我以root身份登录,我想在不关闭控制台的情况下切换用户。 p>
我该如何做?
谢谢。
一个用户名,MySQL会假设root。在大多数情况下,您不会切换用户,但给予单个用户所有必需的权限;例如,访问多个数据库。如果这是不可能的,你可以使用两个MySQL连接与两个不同的用户同时。
I'm a Brand new User to MySQL DB, have installed the WAMPSERVER and I'm using MySQL through the MySQL console.
Query_1: Every time that I log in, it directly asks me for the password of root. However, i want to log in as a different user.
Query_2: If at all i do login as root, i want to switch user without closing the console.
How can I do this?
Thank you.
If you attempt to login without specifying a user-name, MySQL will assume "root". In most cases you don't switch the user, but give a single user all the required rights;, for example to access multiple databases. If that is not possible for you, you can use two MySQL connections with two different users simultaneously.
这篇关于在MySQL中作为特定用户进行身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!