Tutorial - Phpymyadmin Blank Page OR Database Creation error 0 OR Cyberpanel error 500

Tutorial for the following errors:

ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
 Cyberpanel error 500 access
ERROR 1141 (42000): There is no such grant defined for user '‘cyberpanel’' on host '‘localhost’
Phpmyadmin Blank page
Database Creation error 0

FIRST TRY UPGRADING

Upgrading CyberPanel

The following command can be used to upgrade to the latest version.

sh <(curl https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh || wget -O - https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh)

If using a sudo user rather than root, try this:

sudo su - -c "sh <(curl https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh || wget -O - https://raw.githubusercontent.com/usmannasir/cyberpanel/stable/preUpgrade.sh)"

  1. Stop service

service mysql stop

  1. Remove privilegies

sudo mysqld_safe --skip-grant-tables --skip-networking &

  1. (Open in new terminal):

mysql -u root

  1. Set password in user table of mysql database use

UPDATE user SET authentication_string=PASSWORD(‘newpassword’) WHERE user=‘root’;
FLUSH PRIVILEGES;
EXIT;

  1. Login with new password

mysql -u root -p

mysql -u root -p -h localhost

Test:

sudo systemctl restart mariadb

Exit recovery mode

sudo pkill mysqld_safe

Start service:

sudo systemctl start mysql

sudo systemctl start mariadb

The passwords are the same ?

/usr/local/CyberCP/CyberCP/settings.py

/etc/cyberpanel/mysqlPassword

PART 2

MariaDB Log - MySQL

  1. Check status

systemctl status mariadb.service

  1. Check logs

journalctl -xe
sudo nano /var/log/mysql/error.log

  1. Restart

sudo service mysql restart

DOESNT WORK??

Find mysql process

ps aux | grep mysql

After

sudo kill -9 number of process

Checking you MYSQL FILE ERROR

tail -100 /var/log/mysql/error.log

HOW TO FIND USERS ON MYSQL

  1. Login

mysql -u root -p

  1. List users:

SELECT user, host FROM mysql.user;

  1. Show grants in database user:

SHOW GRANTS FOR ‘USER’@‘HOST’;

OUTPUT message is like:

±----------------------------------------------------------------------------------------------------------------------------+
| Grants for USER@HOST |
±----------------------------------------------------------------------------------------------------------------------------+
| GRANT ALL PRIVILEGES ON . TO ‘cyberpanel’@‘localhost’ IDENTIFIED BY PASSWORD ‘hash_da_senha’ WITH GRANT OPTION |
±----------------------------------------------------------------------------------------------------------------------------+

HOW TO CHANGE PRIVILEGES ON MYSQL / MARIADB

  1. use mysql;
  1. UPDATE mysql.user SET PASSWORD=PASSWORD('MyNewPass') WHERE USER='root';
  1. FLUSH PRIVILEGES;
  1. GRANT ALL ON . TO ‘root’@‘localhost’;

HOW TO FIX PROXY MESSAGE ON DATABASE

The message above:

| GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION  

  1. Login

mysql -u root -p

Fix code (proxy off)

TRUNCATE TABLE mysql.proxies_priv;
FLUSH PRIVILEGES;

HOW TO BACKUP YOUR SQL FILES:

  1. LOGIN

mysql -u USER -p

  1. Show users on mysql:

SELECT user, host FROM mysql.user;

  1. backup sql file (database) to directory

mysqldump -u root -p NAMEOFDATABASE > /home/WEBSITE.COM/public_html/backupsqlfile.sql

  1. RESTART CPANEL - Very important for error 500
> systemctl restart lscpd

1 Like