ERROR 1044 (42000): Access denied for 'root' With All Privileges

后端 未结 4 1909
一生所求
一生所求 2020-12-01 08:06

I have strange error. I am logged in local Mysql as root via command line. After creating database:

create database some_db;

Then giving pr

4条回答
  •  猫巷女王i
    2020-12-01 08:42

    If you get an error 1044 (42000) when you try to run SQL commands in MySQL (which installed along XAMPP server) cmd prompt, then here's the solution:

    1. Close your MySQL command prompt.

    2. Open your cmd prompt (from Start menu -> run -> cmd) which will show: C:\Users\User>_

    3. Go to MySQL.exe by Typing the following commands:

    C:\Users\User>cd\ C:\>cd xampp C:\xampp>cd mysql C:\xxampp\mysql>cd bin C:\xampp\mysql\bin>mysql -u root

    1. Now try creating a new database by typing:

      mysql> create database employee;
      

      if it shows:

      Query OK, 1 row affected (0.00 sec)
      mysql>
      

      Then congrats ! You are good to go...

提交回复
热议问题