linux????mysql????
???????????? ???????[ 2016/11/24 10:11:39 ] ????????????? MySQL
????linux????mysql???????????????????4??linux????mysql?????????????
???????????
????# /etc/init.d/mysql stop
????# mysqld_safe --user=mysql --skip-grant-tables --skip-networking &
????# mysql -u root mysql
????mysql> update user set password=password('newpassword') where user='root';
????mysql> flush privileges;
????mysql> quit
????# /etc/init.d/mysql restart
????# mysql -uroot -p
????enter password: <?????????????newpassword>
????mysql>
??????????????????/etc/mysql/debian.cnf?????[client]?????????????????:
????# mysql -udebian-sys-maint -p
????enter password: <????[client]???????>
????mysql> update user set password=password('newpassword') where user='root';
????mysql> flush privileges;
????mysql> quit
????# mysql -uroot -p
????enter password: <?????????????newpassword>
????mysql>
???????????????????????н??й????????????root??????????????????????????λ?п??????£????????????лл????
????# mysql -uroot -p
????enter password: <????/etc/mysql/debian.cnf?????[client]??????????>
??????????????????£?
????1?? ???mysql????
????/etc/init.d/mysqld stop
????2????? –skip-grant-tables??????mysql?????????? ??/etc/inin.d/mysqld??????λ??????????
????vi /etc/init.d/mysqld
????????????????????????????--skip-grant-tables
????/usr/bin/mysqld_safe --skip-grant-tables --datadir="$datadir" --socket="$socketfile"
????--log-error="$errlogfile" --pid-file="$mypidfile"
????????--skip-grant-tables??????????mysql?????????? ?????????????????????mysql??root?????????3?????????mysql????
????/etc/init.d/mysqld start
????4. ???root?????????
????mysql> update mysql.user set password=password??'123456'?? where user=root??
????mysql> flush privileges??
????mysql> quit
????5. ???????mysql????????? ???????????
????mysql
????mysql -u root –p
????????????123456
????6?????mysql????
????/etc/init.d/mysqld stop
????7?? ????????2??????/etc/init.d/mysqld????????????????????--skip-grant-tables???8?????? ???mysql????
????/etc/init.d/mysqld start
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11