php - Unable to connect to Amazon RDS from EC2 wordpress site -
i'm migrating website cpanel hosting amazon ec2. i'm using amazon rds host wordpress database.
i followed following steps:
- created folder wordpress files old server.
- created database in rds , uploaded old site's db dump.
- edited wp-config.php file change parameters connect rds instance.
while worked out fine, except i'm getting following error "error establishing database connection
" while open site in browser. tried changing security group on rds , allow , added user on mysql required permission database.
the problem connection rds not getting established. i'm able connect rds ec2 instance wordpress not able to.
my wp-config.php
looks like:
/** name of database wordpress */ define('db_name', 'wordpress'); /** mysql database username */ define('db_user', 'db_username'); /** mysql database password */ define('db_password', 'db_password'); /** mysql hostname */ define('db_host', 'wordpress-site.something.rds.amazonaws.com:3306'); /** database charset use in creating database tables. */ define('db_charset', 'utf8'); /** database collate type. don't change if in doubt. */ define('db_collate', '');
edit: changed localhost's wp-config.php point rds , site working fine on localhost. problem connection issues ec2.
go aws settings , have see ports have open. iirc, shut, have open port db.
Comments
Post a Comment