def initMysql8Data():
    '''
    chmod 644 /www/server/mysql-community/etc/my.cnf
    try:
    mysqld --basedir=/usr  --datadir=/www/server/mysql-community/data --initialize-insecure
    mysqld --defaults-file=/www/server/mysql-community/etc/my.cnf --initialize-insecure
    mysqld --initialize-insecure
    select user, plugin from user;
    update user set authentication_string=password("123123"),plugin='mysql_native_password' where user='root';
    '''
    datadir = getDataDir()
    if not os.path.exists(datadir + '/mysql'):
        serverdir = getServerDir()
        user = pGetDbUser()

        cmd = serverdir + '/bin/mysqld --basedir=' + serverdir + ' --datadir=' + datadir + \
            ' --initialize-insecure --lower-case-table-names=1'
        # print(cmd)
        data = mw.execShell(cmd)
        # print(data)
        if data[1].lower().find('error') != -1:
            exit("Init MySQL8+ Data Error:"+data[1])
        if data[1].lower().find('not found') != -1:
            exit("Init MySQL8+ Data Error:"+data[1])

        if not mw.isAppleSystem():
            mw.execShell('chown -R mysql:mysql ' + datadir)
            mw.execShell('chmod -R 755 ' + datadir)
        return False
    return True

    chmod 644 /www/server/mysql-community/etc/my.cnf
    try:
    mysqld --basedir=/usr  --datadir=/www/server/mysql-community/data --initialize-insecure
    mysqld --defaults-file=/www/server/mysql-community/etc/my.cnf --initialize-insecure
    mysqld --initialize-insecure
    select user, plugin from user;
    update user set authentication_string=password("123123"),plugin='mysql_native_password' where user='root';
    
plugins/mysql-community/index.py