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)"
- Stop service
service mysql stop
- Remove privilegies
sudo mysqld_safe --skip-grant-tables --skip-networking &
- (Open in new terminal):
mysql -u root
- Set password in user table of mysql database use
UPDATE user SET authentication_string=PASSWORD(‘newpassword’) WHERE user=‘root’;
FLUSH PRIVILEGES;
EXIT;
- 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
- Check status
systemctl status mariadb.service
- Check logs
journalctl -xe
sudo nano /var/log/mysql/error.log
- 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
- Login
mysql -u root -p
- List users:
SELECT user, host FROM mysql.user;
- 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
- use mysql;
UPDATE mysql.user SET PASSWORD=PASSWORD('MyNewPass') WHERE USER='root';
FLUSH PRIVILEGES;
- 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
- Login
mysql -u root -p
Fix code (proxy off)
TRUNCATE TABLE mysql.proxies_priv;
FLUSH PRIVILEGES;
HOW TO BACKUP YOUR SQL FILES:
- LOGIN
mysql -u USER -p
- Show users on mysql:
SELECT user, host FROM mysql.user;
- backup sql file (database) to directory
mysqldump -u root -p NAMEOFDATABASE > /home/WEBSITE.COM/public_html/backupsqlfile.sql
- RESTART CPANEL - Very important for error 500
> systemctl restart lscpd