[SOLVED] mariadb mysql Compatibility issue GRANT ALL ON database.* TO 'user';
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
mariadb mysql Compatibility issue GRANT ALL ON database.* TO 'user';
mysql -p
create database aleX;
Query OK, 1 row affected (0.00 sec)
create USER 'aleX'@'localhost';
Query OK, 0 rows affected (0.00 sec)
SET PASSWORD FOR 'aleX'@'localhost' = PASSWORD('7!d6b4c40cd');
Query OK, 0 rows affected (0.00 sec)
GRANT ALL ON aleX.* TO 'aleX';
ERROR 1133 (28000): Can't find any matching row in the user table
GRANT ALL ON aleX.* TO 'aleX'; worked just fine on mysql
mysql -p
create database aleX;
Query OK, 1 row affected (0.00 sec)
create USER 'aleX'@'localhost';
Query OK, 0 rows affected (0.00 sec)
SET PASSWORD FOR 'aleX'@'localhost' = PASSWORD('7!d6b4c40cd');
Query OK, 0 rows affected (0.00 sec)
GRANT ALL ON aleX.* TO 'aleX';
ERROR 1133 (28000): Can't find any matching row in the user table
GRANT ALL ON aleX.* TO 'aleX'; worked just fine on mysql
aleX@localhost is not the same user as aleX.
GRANT ALL ON aleX.* TO 'aleX'@'localhost' should work.
This works the same on MySQL and MariaDB.
If it worked this way, exactly as you have shown, on MySQL, then there would have been a non-localhost user of the same name in the users table.
GRANT ALL on aleX.* to 'aleX'@'localhost';
Query OK, 0 rows affected (0.00 sec)
I hope switching will not break CMS systems designed to run on LAMP.
Well, as noted above, there is no difference in this between MySQL and MariaDB. So if it works with 'aleX' on one but not the other, that is only because one has a MySQL 'aleX' user and the other does not.
Remember, the MySQL/MariaDB user names have nothing to do with system users of the same name. And 'username' is not the same user as 'username@localhost'.
Good luck!
Last edited by astrogeek; 01-30-2016 at 10:47 PM.
Reason: typos
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.