eXPlosion Posted June 13, 2020 Share Posted June 13, 2020 (edited) I have bitnami LAMPStack 7.4.6-1 running MySQL database on 3306 port on newest Ubuntu. Symfony version 5.1.0 When I run this command as root user: root@ubuntu:/opt/lampstack-7.4.6-1/apache2/htdocs/sfcourse# php bin/console doctrine:database:create The error is: An exception occurred in driver: SQLSTATE[HY000] [1045] Access denied for user 'db_user'@'127.0.0.1' (using password: YES) I don't know where db_user is comming from, .env file is defining other user. .env file DATABASE_URL=mysql://root:000000@localhost:3306/sfcourse doctrine.yaml file: doctrine: # parameters: # env(DATABASE_URL): '' dbal: driver: 'pdo_mysql' server_version: '5.7' charset: utf8mb4 default_table_options: charset: utf8mb4 collate: utf8mb4_unicode_ci url: '%env(resolve:DATABASE_URL)%' googled but most suggestions are to make 127.0.0.1 as localhost MySQL version is 8.0.20 after checking mysql> SHOW VARIABLES LIKE "%version%"; I can login to SQL via terminal as root, that is working I created that strange user db_user in MySQL and in .env file and got still same error. I can connect as db_user to MySQL. If I change user in .env to other, error still says db_user. EDIT: this is same question https://stackoverflow.com/questions/55687722/an-exception-occurred-in-driver-sqlstatehy000-1045-access-denied-for-user, he installed what he had and that solved problem? Dumb Edited June 13, 2020 by eXPlosion Quote Link to comment https://forums.phpfreaks.com/topic/310932-doctrinedatabasecreate/ Share on other sites More sharing options...
eXPlosion Posted July 23, 2020 Author Share Posted July 23, 2020 It's from this tutorial step-by-step stuck at 1:16:35 Quote Link to comment https://forums.phpfreaks.com/topic/310932-doctrinedatabasecreate/#findComment-1579969 Share on other sites More sharing options...
gizmola Posted July 25, 2020 Share Posted July 25, 2020 I watched most of this, and the step where doctrine is installed and configured seems to be right. You might want to try deleting the vendors directory and running another composer install. Quote Link to comment https://forums.phpfreaks.com/topic/310932-doctrinedatabasecreate/#findComment-1580012 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.