I m trying to create new database through mysql or ssh but on both m getting error
mysql : CREATE DATABASE porto;
Error : Access denied for user 'root'@'localhost' to database 'porto' on ssh : ERROR 1044 (42000): Access denied for user 'root'@'localhost' to database 'porto'
mysql> CREATE USER 'testuser'@'localhost' IDENTIFIED BY 'ecomaddon@42';
ERROR 1227 (42000): Access denied; you need (at least one of) the CREATE USER privilege(s) for this operation
mysql> SELECT User,Host From mysql.user;
ERROR 1142 (42000): SELECT command denied to user 'root'@'localhost' for table 'user'
Its problem of privilege but don't know how give root user all privilege ai had try all methods but got nothing.
You can try to access as root
mysql -h 127.0.0.1 -P 3306 -u root -p
If it still does not work follow this guide https://www.a2hosting.com/kb/developer-corner/mysql/managing-mysql-databases-and-users-from-the-command-line
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments