AWS中怎么安装Mysql
发表于:2024-10-27 作者:千家信息网编辑
千家信息网最后更新 2024年10月27日,AWS中怎么安装Mysql,针对这个问题,这篇文章详细介绍了相对应的分析和解答,希望可以帮助更多想解决这个问题的小伙伴找到更简单易行的方法。第一步: 切换到root账户sudo -s更换时区为东八区(
千家信息网最后更新 2024年10月27日AWS中怎么安装Mysql
AWS中怎么安装Mysql,针对这个问题,这篇文章详细介绍了相对应的分析和解答,希望可以帮助更多想解决这个问题的小伙伴找到更简单易行的方法。
第一步: 切换到root账户
sudo -s
更换时区为东八区(北京时间)
mv /etc/localtime /etc/localtime.bak cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
第二步: 需要更新一下yum(因为亚马逊的yum版本经常都是晚于潮流)
yum update
第三步: 安装mysql
yum install -y mysql57-server
如果提示 Unable to find a match: mysql57-server则需要去mysql官网获取下安装包
//下载sudo rpm -ivh https://repo.mysql.com//mysql57-community-release-el7-11.noarch.rpm//安装sudo yum install mysql-server
第四步: 启动mysql
service mysqld start#设置开机自启动chkconfig mysqld on
第五步: 做一些基础配置
mysql_secure_installation
下面的内容会比较多,其实就几个
[root@ip-172-31-35-183 ec2-user]# mysql_secure_installationSecuring the MySQL server deployment.Connecting to MySQL using a blank password.VALIDATE PASSWORD PLUGIN can be used to test passwordsand improve security. It checks the strength of passwordand allows the users to set only those passwords which aresecure enough. Would you like to setup VALIDATE PASSWORD plugin?#询问你是否启用密码校验Press y|Y for Yes, any other key for No: yThere are three levels of password validation policy:LOW Length >= 8MEDIUM Length >= 8, numeric, mixed case, and special charactersSTRONG Length >= 8, numeric, mixed case, special characters and dictionary file#询问你要使用什么强度的密码,输入0就可以使用任意密码,还有 1和2可选自己看上两行的强度要求Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 0Please set the password for root here.#输入你的密码New password: #再次数据你的密码Re-enter new password: #这行是评价你设定密码的强度,可以忽略Estimated strength of the password: 50 #上一行评价了你的密码强度,如果你觉得不够,你可以输入n重新设置密码,如果对自己的密码满意就输入y,确认使用新密码Do you wish to continue with the password provided?(Press y|Y for Yes, any other key for No) : yBy default, a MySQL installation has an anonymous user,allowing anyone to log into MySQL without having to havea user account created for them. This is intended only fortesting, and to make the installation go a bit smoother.You should remove them before moving into a productionenvironment.#询问你是否删除所有匿名用户,直接选y即可,不需要多想(要多想也随意)Remove anonymous users? (Press y|Y for Yes, any other key for No) : ySuccess.Normally, root should only be allowed to connect from'localhost'. This ensures that someone cannot guess atthe root password from the network.#问你是否要禁用root账户的远程连接,如果禁用了你就只能玩单机操作了,所以选择 nDisallow root login remotely? (Press y|Y for Yes, any other key for No) : n ... skipping.By default, MySQL comes with a database named 'test' thatanyone can access. This is also intended only for testing,and should be removed before moving into a productionenvironment.#问你要不要删除所有测试数据,数据库新装会有一些默认的测试数据,删不删没影响,y和n随意Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y - Dropping test database...Success. - Removing privileges on test database...Success.Reloading the privilege tables will ensure that all changesmade so far will take effect immediately.#问你要不要更新配置(屁话,设置这么辛苦肯定马上更新使用了) yReload privilege tables now? (Press y|Y for Yes, any other key for No) : ySuccess.All done!
第六步: 使用刚设置的密码登入数据库,修改远程ip权限
mysql -u root -p
设置用户 root 可以在任意 IP 下被访问:
grant all privileges on *.* to root@"%" identified by "你的密码";
设置用户 root 可以在本地被访问:
grant all privileges on *.* to root@"localhost" identified by "你的密码";
设置完访问权限后,需要刷新一下
flush privileges
至此结束
关于AWS中怎么安装Mysql问题的解答就分享到这里了,希望以上内容可以对大家有一定的帮助,如果你还有很多疑惑没有解开,可以关注行业资讯频道了解更多相关知识。
密码
数据
强度
输入
用户
问题
更新
内容
数据库
更多
权限
要不
账户
多想
帮助
测试
解答
评价
配置
易行
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
服务器为什么容易被攻击
管理服务器哪个软件好
共享服务器租赁价格
中小学网络安全专题教育
北京高校党建软件开发
云服务器搭建什么网站好
网络技术qq群
数据库有哪些数据安全性限制
济南网络安全技术培训
数据库读取文本文档
公安系统软件开发郑州
河北时代网络技术服务保障
陕西省第六届国家网络安全
数据库附加后修改默认值
网络通讯测试服务器
服务器整体安全检查方法
网络安全行业升级方案
网络安全法ppt 百度
湖泊专题数据库英文
蚂蚁会员北京网络技术服务
昆明游戏赌博软件开发
怎么样对数据库数据进行增删改查
郑州计算机网络技术教程
算法网数据库安全性实验
托马斯英语软件开发商
数据库只安装客户端能用吗
镇江bgp服务器299
linq操作数据库
服务器怎么在安全端口
华为网络技术大赛武长赛区