Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: MariaDB access denied |
|
Author |
|
Markus_Aurelius
Joined: 30 Sep 2015 Posts: 17 Location: worester, usa
|
Posted: Wed 07 Oct '15 18:52 Post subject: MariaDB access denied |
|
|
OK, I am using MariaDB. It is much the same as MySQL. I have created a database. I can do show databases; and I can see the database. Then I created a user.
What I wanted is for the user to have all privileges on the database I just created. After that I did a:
MySQL -u newuser -p newdatabase
enter password: entered the password I get acess denied for newuser@localhost.
To create a new user I found this on the web.
create new user 'newuser'@'newdb' identified by 'new pwd';
Then I did this:
grant all privileges on newdb.* to 'newuser'@'newdb';
Then: flush privileges;
I then went to test this by exiting the database.
I then did this: MySQL -u newuser -p newdatabase
enter password: entered password and got access denied for 'newuser'@'localhost'.
Should I have made newuser a member of MySQL? like root? Was my trying to get into the new database the wrong set of commands?
Any help would be appreciated.
Thank you
Mark |
|
Back to top |
|
roysitumorang
Joined: 13 Jul 2015 Posts: 14 Location: Indonesia, Sidikalang
|
Posted: Thu 08 Oct '15 10:10 Post subject: Re: MariaDB access denied |
|
|
Code: | create new user 'newuser'@'newdb' identified by 'new pwd'; |
Change newdb to localhost.
Code: | grant all privileges on newdb.* to 'newuser'@'newdb';
flush privileges; |
Change newdb.* to newdatabase.*. |
|
Back to top |
|
Markus_Aurelius
Joined: 30 Sep 2015 Posts: 17 Location: worester, usa
|
Posted: Thu 08 Oct '15 13:38 Post subject: Those aren't the real names |
|
|
I just used those name for demonstration purposes. If you want the newuser name is chuck and the db name is drupaul. Amazing. |
|
Back to top |
|
|
|
|
|
|