ubuntu下連接win7下的mysql時,得在win7下給本地數據庫的mysql庫中執行這個添加的權限
grant all privileges on *.* to '用戶名'@'ubuntu地址' identified by '密碼' with grant option;
然後在ubuntu下執行
mysql -h win7的地址 -u root -p 密碼
便可從ubuntu下操作win7下的數據庫
可以在命令行界面輸入下面的內容來更改mysql用戶密碼,前提是已經進入了mysql
mysql > set password for
'用戶名'@'ubuntu地址'=password('密碼');