03-08-2019, 02:28 PM
Quite simple: for security purpose root login from anywhere else other than the localhost command line has been disable for the root user in the newer MySQL/MariaDB versions starting from version 5.7 (I think or maybe even from 5.6 already).
You need to create a seperate new user and grant it permission to the whole system if you want a "root like" user that you can use in phpMyAdmin.
1. Login into your VPS via SSH as root.
2. Run this command to start the MySQL command line as MySQl root in the main mysql database:
3. Create the new user with:
(Remember to replace "desiredusername" and "yourpassword" with the corresponding username and password you want to use for it.)
4. Grant the user full permission to the MySQl system and databases:
(Remember to replace "desiredusername" with the corresponding username from step 3.)
5. Reload the MySQl permissions to apply changes:
6. Exit MySQL command line with a simple "exit".
Make sure you phpMyAdmin listens to MySQL on localhost.
Try to login with the new user now. That should be it already. Works for me. I use Maria DB 10.1 on Debian 9 with PHP 7.3 and after running this commands I was able to create a root like user that I can use in phpMyAdmin for SQL administration.
You need to create a seperate new user and grant it permission to the whole system if you want a "root like" user that you can use in phpMyAdmin.
1. Login into your VPS via SSH as root.
2. Run this command to start the MySQL command line as MySQl root in the main mysql database:
Code: (Select All)
mysql --user=root mysql
3. Create the new user with:
Code: (Select All)
CREATE USER 'desiredusername'@'localhost' IDENTIFIED BY 'yourpassword';
4. Grant the user full permission to the MySQl system and databases:
Code: (Select All)
GRANT ALL PRIVILEGES ON *.* TO 'desiredusername'@'localhost' WITH GRANT OPTION;
5. Reload the MySQl permissions to apply changes:
Code: (Select All)
FLUSH PRIVILEGES;
6. Exit MySQL command line with a simple "exit".
Make sure you phpMyAdmin listens to MySQL on localhost.
Try to login with the new user now. That should be it already. Works for me. I use Maria DB 10.1 on Debian 9 with PHP 7.3 and after running this commands I was able to create a root like user that I can use in phpMyAdmin for SQL administration.
![[Image: zHHqO5Q.png]](https://i.imgur.com/zHHqO5Q.png)