3、使用如下命令更改密碼:
shell> mysqladmin -u root -p password ‘newpass’
Enter Password:*******
出現(xiàn)Enter Password的提示后輸入原來的密碼oldpass即可。
讀者可以嘗試其它所有本章介紹的方法。
4、首先以root用戶的身份連接到服務(wù)器:
shell> mysql -u root -p
Enter password:*******
出現(xiàn)Enter password提后輸入root用戶的密碼,然后即進(jìn)入mysql客戶機(jī)的交互模式,可以看到下面的提示:
Welcome to the MySQL monitor. Commands end with or \g.
Your MySQL connection id is 4 to server version: 3.23.25-beta-log
Type help or \h for help. Type \c to clear the buffer
mysql>
然后發(fā)布查詢,直接鍵入題目中的語句:
mysql> SELECT User,Host FROM mysql.user
標(biāo)簽:
Enter
mysqladmin
Password
password
上傳時間:
2016-03-17
上傳用戶:talenthn