CREATE DATABASE php_mysql_test; USE php_mysql_test; CREATE TABLE foobar (name VARCHAR(10), value INTEGER); INSERT INTO foobar VALUES("fish", 42); # It's not possible to use root user since MariaDB 10.4 # See https://mariadb.com/kb/en/authentication-plugin-unix-socket/ CREATE USER 'tester'@'localhost'; GRANT SELECT ON php_mysql_test.foobar TO 'tester'@'localhost';