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?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…