Created
October 8, 2012 03:24
-
-
Save laozhu/3850560 to your computer and use it in GitHub Desktop.
install mysql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
emerge -av mysql | |
eix-installed all | grep mysql | |
> dev-db/mysql-5.1.62-r1 | |
emerge --config =dev-db/mysql-5.1.62-r1 | |
# 加入开机启动项 | |
rc-update add mysql default | |
/etc/init.d/mysql restart | |
rc-status | |
# 重置ROOT密码 | |
/etc/init.d/mysqld stop | |
mysqld_safe --skip-grant-tables & | |
mysql -u root | |
mysql> use mysql; | |
mysql> update user set password=PASSWORD("newrootpassword") where user='root'; | |
mysql> flush privileges; | |
mysql> quit | |
/etc/init.d/mysql start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment