arrow_upward

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
mysql-server and phpmyadmin problem
#2
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:
mysql --user=root mysql

3. Create the new user with:
CREATE USER 'desiredusername'@'localhost' IDENTIFIED BY 'yourpassword';
(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:
GRANT ALL PRIVILEGES ON *.* TO 'desiredusername'@'localhost' WITH GRANT OPTION;
(Remember to replace "desiredusername" with the corresponding username from step 3.)

5. Reload the MySQl permissions to apply changes:
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]


Messages In This Thread
mysql-server and phpmyadmin problem - by Rehan - 03-08-2019, 02:14 PM
RE: mysql-server and phpmyadmin problem - by Mashiro - 03-08-2019, 02:28 PM

Possibly Related Threads…
Thread
Author
Replies
Views
Last Post
14,028
03-21-2019, 09:12 PM
Last Post: amontes

person_pin_circle Users browsing this thread: 1 Guest(s)
Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - Hyper Expert - Shadow Hosting - Bladenode - Hostlease - RackNerd - ReadyDedis - Limitless Hosting