• Resolved mbgb

    (@mbgb)


    I’m having some problems setting up a WordPress installation with AWS. I’m using the virtualhost feature in apache but I’m not sure if that’s even causing the issue.

    https://otherpeoplebeforeyou.co.uk/wp-admin

    My database name in wp-config.php is ‘myblog’ and I am seeing that as schema in mySQL Workbench. Yet I’m persistently hit with ‘the error connecting to database’ message. Does anybody know what could be causing this and how I can fix it?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    using the field values what happens when you type

    mysql -u db_user -pdb_password -h db_host db_name

    Thread Starter mbgb

    (@mbgb)

    Sorry for being dense, yet could you explain further? Specifically where and how I’d be entering the above? I’ve only just began using terminal and sql in this way recently, too used to third party installation tools making everything easy.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    SSH into your server and type that (with the appropriate substitutions) at the command line. It will test whether you entered the right values into wp-config.php.

    Thread Starter mbgb

    (@mbgb)

    Of course, sorry!

    This is what I get from terminal.

    ERROR 2005 (HY000): Unknown MySQL server host ‘db_host’ (0)

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    What did you enter for “db_host”?? As I said, those should be replaced with what you have in your wp-config.php file!

    Thread Starter mbgb

    (@mbgb)

    I don’t have a wp-config.php file as I’ve not yet completed the WordPress installation. I see I have wp-config-sample.php file when looking via FTP. I’m stuck on entering the database settings, any variation and I’m presented with the aforementioned connection message.

    When I enter your command as follows, I realise I’ve not entered a password but I don’t have passwords on the databases I’ve setup in mySQL Workbench.

    mysql -u root -p -h 127.0.0.1 myblog

    I get the following:

    Enter password:
    ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)

    I’ve tried using the IP of my EC2 instance also, I get the following:

    ERROR 2003 (HY000): Can’t connect to MySQL server on ‘52.17.151.122’ (110)

    • This reply was modified 7 years, 11 months ago by mbgb.
    • This reply was modified 7 years, 11 months ago by mbgb.
    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    You did not type what I asked you to type:

    mysql -u db_user -pdb_password -h db_host db_name

    This type, put the password on the command line (with no space after -p)

    Also, using the root user as the user for you site database is a big security no-no.

    Well, if you are new to AWS or this kind of VPS, I suggest you this great tutorial by the guys at Digital Ocean, it works more or less the same, according to linux distribution:

    https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-on-ubuntu-14-04

    This one is for Ubuntu, commands needs to be adapted according to Linux distro on your AWS server (I only use AWS through OpenShift > so RedHat).

    There are also good tutorials from Linode:
    https://www.linode.com/docs/websites/cms/how-to-install-and-configure-wordpress

    Hope it helps,

    EDIT : The tutorials I suggest use Ubuntu, because it’s very stable and “simple” for a Linux distro

    • This reply was modified 7 years, 11 months ago by Digico Paris. Reason: additional information

    Which linux did you end up choosing for your EC2? I went with the Amazon Linux and followed their official instruction on installing WordPress.
    https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/hosting-wordpress.html

    Hope this helps.

    Hi, I wrote a tutorial from install a single server on AWS to a scalable deploy, this is the link.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘‘Error Connecting To..’ message installing WordPress as a VirtualHost with AWS’ is closed to new replies.