I am creating a Laravel App and testing it in production mode on a fresh installation of Ubuntu 19.10.03. Fresh LAMP installation (PHP 7.3, MySQL 8.0.19-0).
I can create a new database, and a new user that has full access to the database, but Laravel requires that the user have the SELECT option from the 'information_schema' database as well. Here is the process I am using:
$ sudo mysql
mysql> CREATE DATABASE IF NOT EXISTS `my-laravel-database`;
mysql> CREATE USER IF NOT EXISTS 'laravelUser'@'localhost' IDENTIFIED WITH mysql_native_password BY 'myPass';
mysql> GRANT ALL PRIVILEGES ON `my-laravel-database`.* TO 'laravelUser'@'localhost' WITH GRANT OPTION;
mysql> GRANT SELECT ON `information_schema`.* TO 'laravelUser'@'localhost';
The last command always returns
ERROR 1044 (4200): Access denied for user 'root'@'localhost' to database 'information_schema'
I have tried running the mysql_secure_installation command to set the root password, this did not help. I can run the app as the root user, but I do not want to do this in production.
I have also tried a fresh installation of Ubuntu with just the LAMP services installed.