Posted on 03 Oct 2019 11:10:06 (6 months ago)
Mainly in MySQL remote login is enabled by default but not in the case for 'root'. If you want to enable you need to login to 'root' user in command line. Below is the command,
sudo mysql -u root -p
Then enter your password. After successfull login you need to type below command,
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
After that go to 'my.cnf file',
For Linux's path: '
/etc/mysql/my.cnf' or '/etc/mysql/mysql.conf.d/mysqld.cnf'
For Window's path: '
C:\Program Files\MySQL\MySQL Server*\'
After opening the 'my.cnf' file comment out the following line,
Change below line,
bind-address = 127.0.0.1
#bind-address = 127.0.0.1
After that restart the MySQL server.