I am relatively new LAMP dev who is trying to learn Linux primarily through AWS. I have a live Elastic Beanstalk instance up and running. I did a yum install of the following packages:
mysql55.x86_64 mysql55-bench.x86_64 mysql55-common.x86_64 mysql55-devel.x86_64 mysql55-libs.x86_64 mysql55-server.x86_64 mysql55-test.x86_64
Which all seemed to install fine ... then typed ...
mysql -V
which gets me
mysql Ver 14.14 Distrib 5.5.20, for Linux (x86_64) using readline 5.1
... which confirms mysql is installed ... but then when I type ...
mysql -u ec2-user -p
Enter password: /*leaving blank*/
I get ...
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Now the thing is I am ssh-ing into this server with a Security Group key pair I created in AWS Console. So the key is authenticating me (from the .ppk file) when I log into the box as ec2-user. That IS my "root" user as far as I know, there is no password, but I may be mistaken.
So, basically I don't understand the basics of how to begin using MySQL in a linux environment. I've only really used PHPMyAdmin and the MySQL command line from WAMP until now.
Can somebody help me with where I'm getting my wires crossed here?
Whoa. Hold up. Before you do anything else, stop and spin up your mysql machine outside of beanstalk, or use Amazon RDS. Beanstalk is designed to autoscale the web tier of your application, not hold your database. The moment it scales your application up, that new machine won't have your data. The moment it scales back down, it might remove your database machine. If that instance ends up on retired or corrupt hardware, beanstalk will replace it.
Give the Beanstalk architectural overview a read. Note the diagram. Your database layer exists outside the beanstalk environment, not in it.
I am relatively new LAMP dev who is trying to learn Linux primarily through AWS. I have a live Elastic Beanstalk instance up and running. I did a yum install of the following packages:
mysql55.x86_64 mysql55-bench.x86_64 mysql55-common.x86_64 mysql55-devel.x86_64 mysql55-libs.x86_64 mysql55-server.x86_64 mysql55-test.x86_64
Which all seemed to install fine ... then typed ...
mysql -V
which gets me
mysql Ver 14.14 Distrib 5.5.20, for Linux (x86_64) using readline 5.1
... which confirms mysql is installed ... but then when I type ...
mysql -u ec2-user -p
Enter password: /*leaving blank*/
I get ...
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Now the thing is I am ssh-ing into this server with a Security Group key pair I created in AWS Console. So the key is authenticating me (from the .ppk file) when I log into the box as ec2-user. That IS my "root" user as far as I know, there is no password, but I may be mistaken.
So, basically I don't understand the basics of how to begin using MySQL in a linux environment. I've only really used PHPMyAdmin and the MySQL command line from WAMP until now.
Can somebody help me with where I'm getting my wires crossed here?
Whoa. Hold up. Before you do anything else, stop and spin up your mysql machine outside of beanstalk, or use Amazon RDS. Beanstalk is designed to autoscale the web tier of your application, not hold your database. The moment it scales your application up, that new machine won't have your data. The moment it scales back down, it might remove your database machine. If that instance ends up on retired or corrupt hardware, beanstalk will replace it.
Give the Beanstalk architectural overview a read. Note the diagram. Your database layer exists outside the beanstalk environment, not in it.
0 commentaires:
Enregistrer un commentaire