mysql

 mysql -u root -p

mysql -u root -p dc169b6239

登陆数据库的方法:

mysql -uroot -p

然后再输入相应的密码。
显示数据库(注意有分号)

show databases;
  1. mysqldump 下载数据问题
    由于权限不够,需要采用以下指令可以跨越权限
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.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

友情链接更多精彩内容