aws试用

  1. 注册新账号
  2. 配置实例
  3. 环境搭建

//安装mysql客户端

yum install mysql

//安装mysql服务器

yum install mysql-server

//无用,用于开发

yum install mysql-devel

//编辑配置文件

vi /etc/my.cnf

[client]
default-character-set=utf8
socket=/data/mysql/run/mysql.sock
[mysqld]
character_set_server=utf8
datadir=/data/mysql/data
socket=/data/mysql/run/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0

[mysqld_safe]
user=mysql
socket=/data/mysql/run/mysql.sock
datadir=/data/mysql/data
log-error=/data/mysql/log/mysqld.log
pid-file=/data/mysql/run/mysqld.pid

//创建db目录

mysql_install_db --basedir=/data/mysql/data --user=mysql

//启动实例

mysqld_safe&


//设置root用户密码

mysqladmin -uroot password xxx


//创建用户

CREATE USER 'username'@'host' IDENTIFIED BY 'password';

//授权

GRANT privileges ON databasename.tablename TO 'username'@'host'


//删除无密码登陆

drop user 'xxx'@'xxx'
delete from mysql.user where user='';

//刷新权限
flush privileges;

//打开mysql端口

iptables -I INPUT 0 -p tcp --dport 3306 -j ACCEPT


安装jdk

安装tomcat


你可能感兴趣的:(aws试用)