unable to create database in mysql or via ssh

Sohan Singh

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.

Alfredo Lanzetta

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.

edited at
0

Comments

0 comments
Login to comment

Related

Connecting to MySQL database via SSH

Unable to create a user with password via ssh

Unable to create a simple database in mySQL

Allow user to connect to mysql via ssh to create database dump, but don't allow anything else

Unable to create database via mongo compass

"Unable to connect to any of the specified MySQL hosts" when connecting to MySQL database via SSH.NET tunnel in C#

Unable to Connect to RDS MySQL database via Workbench

Unable to create database using prepared statements in MySql

Unable to create chain pagination of MySQL database

Unable to load MySQL database via entity framework in VS 2019

Bash Script SSH into MYSQL Server and create database with dash in it

Nodejs Expess Script Unable to Create the Mysql Database Table

Unable to access the server via SSH

Unable to ssh to launchpad via bazaar

Create database via ODBC

Unable to create/access database

Unable to create a table in database

Create user to MySQL with ssh

Eclipse to MySql via SSH proxy connects but can't query without a database qualifier

Trouble Connecting to MySQL via SSH

Unable to create relationship in MySQL

Unable to connect to server as root via ssh

Unable to connect to bitbucket via ssh in jenkins

Magallanes deploy unable to connect via ssh key

Unable to clone git via SSH Tunnel

Unable to ssh to Beaglebone Black via Putty on windows

Unable to connect to Snappy Ubuntu Core via ssh

unable to connect RDS MYSQL Database via AWS EC2 instance but its showing error ( mysql: command not found) Mysql is installed on instances

Android Unable to create SQLite Database