2018年5月6日 星期日

Ubuntu 18.04 mysql install

sudo apt install mysql-server

sudo mysql -u root

mysql> FLUSH PRIVILEGES;

mysql> use mysql;

mysql> UPDATE user SET plugin="mysql_native_password" WHERE User='root';


mysql> UPDATE user SET authentication_string=PASSWORD("***") WHERE User='root';
# *** is your password

mysql>UNINSTALL COMPONENT "file://component_validate_password";

mysql> quit

sudo service mysql restart


After install ibus input method

ibus restart
Use Setings > Region & Language to add new input sources

Remove Mysql completely, including databases and anything about Mysql, such as phpmyadmin

sudo service mysql stop

sudo apt-get remove --purge *mysql\*
sudo apt-get autoremove
sudo apt-get autoclean