Okay, so I've spent a significant chunk of my day on this stressful situation.
The short version is I keep creating a username and password for MySQL (MariaDB) and I can't get in no matter what.
Here's an example of what I'm going through:
Code:
$ /sbin/service mysqld restart
Redirecting to /bin/systemctl restart mysqld.service
$ mysql_setpermission -u user
Password for user user to connect to MySQL:
Can't make a connection to the mysql server.
The error: Access denied for user 'user'@'localhost' (using password: YES) at /usr/bin/mysql_setpermission line 90, <STDIN> line 1.
Here's the appropriate line in mysql.user:
Code:
| % | user | *hashorsomethinghere | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | | | | | 0 | 0 | 0 | 0 | | | N | N |p
I can get in fine as the root user which has a password, but for some reason, everything I do with this other account fails with an error.
I've done every literal grant thing I could think of. Plus, I'm mostly using phpMyAdmin. I can't imagine why this is failing.
Code:
UPDATE `mysql`.`user` SET `Password` = PASSWORD('password') WHERE `user`.`Host` = '%' AND `user`.`User` = 'user'
Code:
GRANT ALL PRIVILEGES ON `database`.* TO 'user'@'%'WITH GRANT OPTION;
How do I find out exactly why this is failing?
Code:
$ mysql -u user -p database
Enter password:
ERROR 1045 (28000): Access denied for user 'user'@'localhost' (using password: YES)