mysql 'root'@'localhost'&‘root’@‘%’區別,mysqllocalhost

來源:互聯網
上載者:User

mysql 'root'@'localhost'&‘root’@‘%’區別,mysqllocalhost

1.%允許來自任何ip的串連   localhost允許原生串連
2. dbfor studio mysql 6.2.280
  %的情況,使用backup databases,倒出來的SQL檔案,在另外一個資料庫中匯入(restore database)不進去
  localhost的情況,使用backup databases,倒出來的SQL檔案,在另外一個資料庫中可以正常匯入
3.  select * from mysql.proc可以看到他們的區別(procedure和function一樣)
db                name          type         specific_name lanage  sql_data_access                                                                                 definer 
  
work inventory_held_by_customer FUNCTION inventory_held_by_customer SQL READS_SQL_DATA NO DEFINER       root@localhost
work inventory_in_stock FUNCTION inventory_in_stock SQL READS_SQL_DATA NO DEFINER       root@localhost
game F_Dep_GetChildList FUNCTION F_Dep_GetChildList SQL CONTAINS_SQL NO DEFINER       user01@%
game F_Get_TaskDeviationEstimate FUNCTION F_Get_TaskDeviationEstimate SQL CONTAINS_SQL NO DEFINER       user01@%

mysql問題:access denied for user 'root@localhost'(using password: YES)

這個錯誤的意思是root密碼錯誤,如果不知道root的密碼,請換一個能登陸的使用者名稱和密碼。

---
以上,希望對你有所協助。
 
linux下安裝mysql後Access denied for user 'root'@'localhost' (using password: YES)

給你個方法試一試,我以前也遇到過就是這麼解決的:
首先結束mysql進程,利用ps aux | grep mysql命令得到進程ID號,kill ID號,結束進程
其次,運行mysqld --skip-grant-tables
然後,再開一個終端,輸入mysql -u root mysql
進去後,執行UPDATE user SET Password=PASSWORD('my_password') where USER='root';
再執行,FLUSH PRIVILEGES;
退出,重啟mysql,然後你再運行mysql -u root -p輸入你的密碼,應該就OK了
 

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.