mysql

 mysql -u root -p

mysql -u root -p dc169b6239

登陸數(shù)據(jù)庫的方法:

mysql -uroot -p

然后再輸入相應的密碼。
顯示數(shù)據(jù)庫(注意有分號)

show databases;
  1. mysqldump 下載數(shù)據(jù)問題
    由于權限不夠,需要采用以下指令可以跨越權限
sudo mysqldump -u root -ppwd db --skip-lock-tables > ~/mysql.sql

5.如何source時不產生console output(控制臺輸出)
Disable console output when executing a SQL file using MySQL source command

mysql --user=myusername --password=mypassword --silent --force -b

The last -b option is used to disable beep on error.

Then I choose a database:

use Mydatabasename;

Then I execute SQL form a file like this:

source c:\x\y\z\myfile.sql

That's when things go slowly. I've executed part of the file before so the console is filled with duplicate row errors which slow execution badly. I get 5-10 statements executed per second. Without duplicate rows the code executes tens of thousands of statements (30k+) every 5 seconds.

I need to do this since the file is large and I can't execute it in one go.

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯(lián)系作者
【社區(qū)內容提示】社區(qū)部分內容疑似由AI輔助生成,瀏覽時請結合常識與多方信息審慎甄別。
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發(fā)布,文章內容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

相關閱讀更多精彩內容

友情鏈接更多精彩內容