xsirk Posted August 6, 2017 Share Posted August 6, 2017 Hi, I have a problem trying to deploy my Symfony 3 app, I've already deployed this app in Heroku and Fortrabbit. I'm new to cPanel btw. I created the DB named xsirk_n_w and added user xsirk_r to it, then I imported my DB with phpMyAdmin. My parameters.yml: database_host: localhostdatabase_port: 3306database_name: xsirk_n_wdatabase_user: xsirk_rdatabase_password: null But I'm getting this error when I try to make a petition: "An exception occured in driver: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: NO)" I hope you can help me, please ? Quote Link to comment Share on other sites More sharing options...
Krydos Posted August 6, 2017 Share Posted August 6, 2017 "An exception occured in driver: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: NO)"That means your trying to log in to your database with the mysql username root, not xsirk_r. So you need to fix your user field. You will also need to use a password to connect. Use the same password you used when you created the xsirk_r mysql user. Quote Link to comment Share on other sites More sharing options...
xsirk Posted August 6, 2017 Author Share Posted August 6, 2017 But I'm trying to login to my DB with "xsirk_r" not "root", that's what I don't understand. I changed the password from null to my user password and I'm still getting the same error. Quote Link to comment Share on other sites More sharing options...
miwilc Posted August 6, 2017 Share Posted August 6, 2017 @xsirk Check your configuration, the error says that your trying to login as root. Are you sure you checked your script off any references to root? Quote Link to comment Share on other sites More sharing options...
xsirk Posted August 6, 2017 Author Share Posted August 6, 2017 (edited) Yes, I'm sure and the config (parameters.yml) to connect to the DB is above.I found a way to make it work but I don't think is the right one, commenting these lines in app_dev.php: if (isset($_SERVER['HTTP_CLIENT_IP']) || isset($_SERVER['HTTP_X_FORWARDED_FOR']) || !(in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', 'fe80::1', '::1']) || php_sapi_name() === 'cli-server')) { header('HTTP/1.0 403 Forbidden'); exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');} Edited August 6, 2017 by xsirk Quote Link to comment 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.