cPanel Mysql Profile: Connection failed with error: Can't connect to MySQL server on (115)

cPanel Mysql Profile: Connection failed with error: Can't connect to MySQL server on  (115)


Local Acess  is allowed by default on MySQL.
What is disabled by default is remote root access. If you want to enable that, run this SQL command locally:
 GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;
 FLUSH PRIVILEGES;
And then find the following line and comment it out in your my.cnf file, which usually lives on /etc/mysql/my.cnf on Unix/OSX systems. In some cases the location for the file is /etc/mysql/mysql.conf.d/mysqld.cnf).
If it's a Windows system, you can find it in the MySQL installation directory, usually something like C:\Program Files\MySQL\MySQL Server 5.5\ and the filename will be my.ini.
Change line
 bind-address = 127.0.0.1
to 
bind-address = *
f the GRANT ALL doesn't work, try:
  1. Stop mysqld and restart it with the --skip-grant-tables option.
  2. Connect to the mysqld server with just: mysql (i.e. no -p option, and username may not be required).
  3. Issue the following commands in the mysql client:
    UPDATE mysql.user SET Grant_priv='Y', Super_priv='Y' WHERE User='root';
    FLUSH PRIVILEGES;
After that, you should be able to run GRANT ALL ON *.* TO 'root'@'localhost'; and have it work.

Post a Comment

0 Comments