Once in MySQL command line "select" the mysql database:.Next, in command line, connect to MySQL:.Stop and start MySQL from XAMPP to make this change take effect.This should allow you to access MySQL if you don't know your password. Open C:\xampp\mysql\bin\my.ini (MySQL config file)įind the line and right below it add skip-grant-tables.The answer is copied from " " which I have tried and it works always, try it out. Now your 'root' user and password is ready for login into the phpmyadmin.For me much better way is to do it using terminal rather then PhpMyAdmin UI. Then change the 'root' user password by typing the following in mysql editor `ALTER USER IDENTIFIED BY 'yournewpassword' ` ->this will change your password Paste the password as earlier you have copied then type `FLUSH PRIVILEGES ` ->This will grant all privileges to debian-sys-maint `mysql -u debian-sys-maint -p` -This will prompt for MySql editor Go back to your user prompt and type as follows- `sudo -i` ->This will change to user to root Password = QiExXKUgZHc4Mnui ->Copy this password User = debian-sys-maint ->Copy this user name Sudo nano /etc/mysql/debian.cnf ->This will open mysql database config fileĪnd only see the file. Please note this method is only for Linux 20.04 users Then I followed the below procedure and it worked for me. I was facing the same problem #1045 Error even I logged in as root from my shell. then after set your password.ĪLTER USER IDENTIFIED BY 'new_password' Īfter that loing in below way. T06:50:39.152966Z mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql T06:48:42.976653Z mysqld_safe Directory '/var/run/mysqld' for UNIX socket file don't exists. To resolve this error, then follow below lines. T06:43:33.111388Z mysqld_safe Directory '/var/run/mysqld' for UNIX socket file don't exists. usr/bin/mysqld_safe: 152: /usr/bin/mysqld_safe: cannot create /var/log/mysql/error.log: Permission denied Enter command, sudo mysqld_safe -skip-grant-tables
0 Comments
Leave a Reply. |