Authenticate as a specific user in MySQL

后端 未结 5 1261
离开以前
离开以前 2021-01-14 07:38

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

5条回答
  •  爱一瞬间的悲伤
    2021-01-14 08:27

    It is not possible to switch users in the MySQL console using WAMP. You must use SQL through the windows command line to switch users.

    Steps (win 8):

    1) Start

    2) Type: 'command prompt'

    3) Type: 'cd /'

    4) Navigate to where WAMP bin is located, my location is: C:\wamp\bin\mysql\mysql5.6.17\bin by typing: 'CD wamp\bin\mysql\mysql5.6.17\bin'

    5) run SQL under new user by typing 'mysql -u (username you want to use) -p (database you want to connect to)'

    You will now be logged in as a new user.

提交回复
热议问题