skip to Main Content

I have problem from my phpmyadmin . i dont know what happen but after i restart my pc , i cant acces phpmyadmin . my Phpmyadmin didnt have password . i start my XAMPP normaly and this Apache and Mysql is running . but if i acces :

http://localhost/phpmyadmin/

and Having error :

(HY000/1130): Host ‘localhost’ is not allowed to connect to this MariaDB server

I acces using cmd and accessed :

C:xamppmysqlbin>mysql -u root -p
Enter password:

but have same error

ERROR 1130 (HY000): Host ‘localhost’ is not allowed to connect to this MariaDB server

cant someone give me solution ? i try to search thread for solution but this solution is this error can acces Mysql , but i Cant . can someone helping me ?

3

Answers


  1. Use the IP instead:

    DROP USER 'root'@'127.0.0.1'; GRANT ALL PRIVILEGES ON . TO 'root'@'%';
    

    For more possibilities, see this link.

    To create the root user, seeing as MySQL is local & all, execute the following from the command line (Start > Run > “cmd” without quotes):

    mysqladmin -u root password 'mynewpassword'
    

    or create a new user

    mysql> CREATE USER 'monty'@'localhost' IDENTIFIED BY 'some_pass';
    mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost'
        ->     WITH GRANT OPTION;
    mysql> CREATE USER 'monty'@'%' IDENTIFIED BY 'some_pass';
    mysql> GRANT ALL PRIVILEGES ON *.* TO 'monty'@'%'
        ->     WITH GRANT OPTION;
    
    Login or Signup to reply.
  2. just go to the xamppmysqlbin and open the my.ini file after below lines write skip-grant-tables

    and restart the xampp,
    its work for me.
    [mysqld]
    skip-grant-tables

    Login or Signup to reply.
  3. If you have any other MySQL server installed on the computer, export all the data into separate dump files and store those files somewhere safe (i.e. cloud storage).

    After that, remove or uninstall the sever completely.

    It should work.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search