Jump to content

PHPMyadmin Cant run SQL commands

Guest
Go to solution Solved by Biohazard777,
Just now, Nolanrulesroblox said:

Done both (many times) Still doesnt work, Still gives the same error, If this helps any, Im running on Ubuntu Server 20.04 (LTS, fully updated)

And the command goes through without errors?
Are you sure the user testadmin@localhost exists, run:

SELECT user, host from mysql.user;

and check if he is there.

I dont know if it should be under programs or programming.

 

Im trying to run PHPmyadmin, and I get a "access denied" every time i try to run a SQL command, my account (testadmin) has grant all to every database, yet i still get the access denied. How can i fix this?

 

 

image.thumb.png.5af5a6fee93ef5bce8d64243ac341ee7.png

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, Nolanrulesroblox said:

How can i fix this?

By properly giving testadmin@localhost privileges on the DB... The error message is quite clear.
Also, unless you plan on using that IP (@192.168.0.197 which looks dynamically allocated to me) all the time, consider using a wildcard for the /24 subnet of your Lan.

VGhlIHF1aWV0ZXIgeW91IGJlY29tZSwgdGhlIG1vcmUgeW91IGFyZSBhYmxlIHRvIGhlYXIu

^ not a crypto wallet

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Biohazard777 said:

By properly giving testadmin@localhost privileges on the DB... The error message is quite clear.
Also, unless you plan on using that IP (@192.168.0.197 which looks dynamically allocated to me) all the time, consider using a wildcard for the /24 subnet of your Lan.

But i gave testadmin privileges to every database ( *.* ) yet it still asks for privileges on the database?

Link to comment
Share on other sites

Link to post
Share on other sites

8 minutes ago, Nolanrulesroblox said:

But i gave testadmin privileges to every database ( *.* ) yet it still asks for privileges on the database?

What privileges did you give, what did you put in the @ part and lastly did you flush the privileges?
Hop back on to your main admin / root user whatever you got going on there and then:
 

GRANT ALL PRIVILEGES ON *.* TO 'testadmin'@'localhost';
FLUSH PRIVILEGES;

 

VGhlIHF1aWV0ZXIgeW91IGJlY29tZSwgdGhlIG1vcmUgeW91IGFyZSBhYmxlIHRvIGhlYXIu

^ not a crypto wallet

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, Biohazard777 said:

What privileges did you give, what did you put in the @ part and lastly did you flush the privileges?
Hop back on to your main admin / root user whatever you got going on there and then:
 



GRANT ALL PRIVILEGES ON *.* TO 'testadmin'@'localhost';
FLUSH PRIVILEGES;

 

Done both (many times) Still doesnt work, Still gives the same error, If this helps any, Im running on Ubuntu Server 20.04 (LTS, fully updated)

 

edit* i did run that using

 

shell> sudo su
shell#> mysql -u root -p

 

Edited by Guest
Link to comment
Share on other sites

Link to post
Share on other sites

Just now, Nolanrulesroblox said:

Done both (many times) Still doesnt work, Still gives the same error, If this helps any, Im running on Ubuntu Server 20.04 (LTS, fully updated)

And the command goes through without errors?
Are you sure the user testadmin@localhost exists, run:

SELECT user, host from mysql.user;

and check if he is there.

VGhlIHF1aWV0ZXIgeW91IGJlY29tZSwgdGhlIG1vcmUgeW91IGFyZSBhYmxlIHRvIGhlYXIu

^ not a crypto wallet

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, Biohazard777 said:

And the command goes through without errors?
Are you sure the user testadmin@localhost exists, run:


SELECT user, host from mysql.user;

and check if he is there.

I have 2 testadmin that show, I have one Localhost and a Wild card. 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

8 minutes ago, Biohazard777 said:

And the command goes through without errors?
Are you sure the user testadmin@localhost exists, run:


SELECT user, host from mysql.user;

and check if he is there.

So this fixed it, but not in the way i think

 

So i went into PHPmyadmin ran

 

SELECT user, host from mysql.user;

(as you said)

 

And Edited the User and added Grant (everything was turned on, besides "grant")

 

UPDATE `user` SET `Grant_priv` = 'Y' WHERE `user`.`Host` = 'localhost' AND `user`.`User` = 'testadmin'

/*was set to N, changed to y

 

That fixed it

Link to comment
Share on other sites

Link to post
Share on other sites

Great 😀.
A word of caution, it is bad practice to make admin accounts with @'%', you should tie them to the same machine or at least lan/vpn subnet and when you need an admin either VPN in to that machine or make an API that will call the admin @ localhost. I realize this is probably just a test database in your LAN without access to the internet, but even so good practices keep you safe.

VGhlIHF1aWV0ZXIgeW91IGJlY29tZSwgdGhlIG1vcmUgeW91IGFyZSBhYmxlIHRvIGhlYXIu

^ not a crypto wallet

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×