1、删除默认的账户
    select host,user,authentication_string from user; — 查看默认的账号
    drop user ‘root’@’localhost’;
    drop user ‘root’@’hostname’;
    drop user ‘root’@’::1’;
    drop user ‘’@’localhost’;
    drop user ‘’@’hostname’;
    flush privileges;
    2、mysql数据库服务开机自启动:
    vi /etc/rc.d/rc.local — 添加如下
    /usr/local/mysql/bin/mysqld_safe —defaults-file=/usr/local/mysql5.x/my.cnf —user=mysql &
    chmod u+x /etc/rc.d/rc.local — 赋予执行权限
    3、创建管理员账号:
    GRANT ALL PRIVILEGES ON . TO ‘admin’@’%’ IDENTIFIED BY ‘xxxxxx’ WITH GRANT OPTION;
    flush privileges;

    4、创建ETL账号:
    GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES ON xxx_xxx.* TO ‘etl’@’xxx.xxx.xxx.%’ IDENTIFIED BY ‘xxxxxx’;
    flush privileges;

    5、创建应用账号:
    GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON xxx_xxx.* TO ‘app_dc_pro’@’xxx.xxx.xxx.%’ identified by ‘xxxxxx’;
    flush privileges;