# pacman -S mariadb
# mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
# systemctl enable mysqld.service
# systemctl start mysqld.service
# mysql_secure_installation
遗忘root密码的话,类似windows下:
# systemctl stop mysqld.service
# mysqld_safe --skip-grant-tables &
# mysql -u root mysql
mysql> UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';
mysql> FLUSH PRIVILEGES;
mysql> exit
mysql> FLUSH PRIVILEGES;
mysql> exit
评论
发表评论