$mysql_install_dir/bin/mysql -e "grant all privileges on *.* to root@'127.0.0.1' identified by \"$dbrootpwd\" with grant option;" $mysql_install_dir/bin/mysql -e "grant all privileges on *.* to root@'localhost' identified by \"$dbrootpwd\" with grant option;" $mysql_install_dir/bin/mysql -uroot -p$dbrootpwd -e "delete from mysql.user where Password='';" $mysql_install_dir/bin/mysql -uroot -p$dbrootpwd -e "delete from mysql.db where User='';" $mysql_install_dir/bin/mysql -uroot -p$dbrootpwd -e "delete from mysql.proxies_priv where Host!='localhost';" $mysql_install_dir/bin/mysql -uroot -p$dbrootpwd -e "drop database test;" $mysql_install_dir/bin/mysql -uroot -p$dbrootpwd -e "reset master;" rm -rf /etc/ld.so.conf.d/{mysql,mariadb,percona}*.conf echo "$mysql_install_dir/lib" > mysql.conf /sbin/ldconfig service mysqld stop }