xsirk Posted August 6, 2017 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 ?
Krydos Posted August 6, 2017 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.
xsirk Posted August 6, 2017 Author 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.
miwilc Posted August 6, 2017 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?
xsirk Posted August 6, 2017 Author 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
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now