標籤:sel ant use /etc/ SQ min -- select tar
/usr/local/mysql/bin/mysql -urootps aux | grep mysql/etc/init.d/mysqld start!psls /usr/local/mysql/bin/mysqlecho $PATHexport mysqladmin /ect/profile 修改此目錄,添加一行即可更改mysql密碼mysqladmin -uroot -p ‘aminglinux.1‘ password ‘aminglinux.2‘mysql -p ‘amingliux‘update user set password=password(‘aminglinux‘) where user=‘root‘mysql -uroot -p123456 進入 my.cnf 檔案中,vim,添加一行 skip-grankvim /etc/my.cnf/etc/init.d/mysqld restart再修改一份表切換庫,use mysql: select password from user;update user set password=password(‘aminglinux‘) where user=‘root‘;退出,然後返回 vim /etc/my.cnf 去掉剛剛價的一行--skip-grant;可以直接注釋掉/etc/init.d/mysqld restart 總結-------設定更改root密碼:1.vi /etc/my.cnf----添加一行”skip-grant“2.mysql -uroot; use mysql; updateuser set password=password(‘aminglinux‘) where user=‘root‘3.vi .etc/my.cnf-------delete skip-grant4.restart
mysql--設定更改根密碼