【问题标题】:AWS EC2 mysql root password issueAWS EC2 mysql root 密码问题
【发布时间】:2017-03-15 08:07:14
【问题描述】:

在亚马逊 ec2 新实例中安装了以下内容。
yum install -y httpd24 php56 mysql55-server php56-mysqlnd

然后使用 service mysqld start 启动了 mysqld。它给出了需要执行的命令列表。

按照服务输出中的说明更改 root 密码。运行以下命令时会报错

/usr/libexec/mysql55/mysqladmin: connect to server at '177.37.1.30' failed
error: 'Host 'ip-177-37-1-30.ap-southeast-1.compute.internal' is not allowed to connect to this MySQL server'

我该如何解决这个问题?

service mysqld start
Initializing MySQL database:  Installing MySQL system tables...
161102  4:22:07 [Note] /usr/libexec/mysql55/mysqld (mysqld 5.5.52) starting as process 3137 ...
OK

Filling help tables...
161102  4:22:07 [Note] /usr/libexec/mysql55/mysqld (mysqld 5.5.52) starting as process 3144 ...
OK

To start mysqld at boot time you have to copy
support-files/mysql.server to the right place for your system

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !
To do so, start the server, then issue the following commands:

/usr/libexec/mysql55/mysqladmin -u root password 'new-password'
/usr/libexec/mysql55/mysqladmin -u root -h ip-177-37-1-30 password 'new-password'

Alternatively you can run:
/usr/libexec/mysql55/mysql_secure_installation

which will also give you the option of removing the test
databases and anonymous user created by default.  This is
strongly recommended for production servers.

See the manual for more instructions.

You can start the MySQL daemon with:
cd /usr ; /usr/libexec/mysql55/mysqld_safe &

You can test the MySQL daemon with mysql-test-run.pl
cd /usr/mysql-test ; perl mysql-test-run.pl

Please report any problems at http://bugs.mysql.com/

【问题讨论】:

  • 请看一下这个link,希望对你有帮助

标签: mysql amazon-web-services amazon-ec2


【解决方案1】:

在运行实例的 VPC 中授予 Nat 权限。 谢谢。

【讨论】:

    猜你喜欢
    • 2015-12-08
    • 1970-01-01
    • 1970-01-01
    • 2012-03-30
    • 2012-02-08
    • 2018-06-09
    • 2020-01-16
    • 1970-01-01
    • 2021-05-07
    相关资源
    最近更新 更多