最全mysql命令

本篇文章主要介绍mysql的命令,感兴趣的朋友参考下,希望对大家有所帮助。

C:UsersAdministrator>mysql --helpmysql  Ver 14.14 Distrib 5.5.27, for Win32 (x86)Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Usage: mysql [OPTIONS] [database]  -?, --help          Display this help and exit.  -I, --help          Synonym for -?  --auto-rehash       Enable automatic rehashing. One doesn't need to use                      'rehash' to get table and field completion, but startup                      and reconnecting may take a longer time. Disable with                      --disable-auto-rehash.                      (Defaults to on; use --skip-auto-rehash to disable.)  -A, --no-auto-rehash                      No automatic rehashing. One has to use 'rehash' to get                      table and field completion. This gives a quicker start of                      mysql and disables rehashing on reconnect.  --auto-vertical-output                      Automatically switch to vertical output mode if the                      result is wider than the terminal width.  -B, --batch         Don't use history file. Disable interactive behavior.                      (Enables --silent.)  --character-sets-dir=name                      Directory for character set files.  --column-type-info  Display column type information.  -c, --comments      Preserve comments. Send comments to the server. The                      default is --skip-comments (discard comments), enable                      with --comments.  -C, --compress      Use compression in server/client protocol.  -#, --debug[=#]     This is a non-debug version. Catch this and exit.  --debug-check       Check memory and open file usage at exit.  -T, --debug-info    Print some debug info at exit.  -D, --database=name Database to use.  --default-character-set=name                      Set the default character set.  --delimiter=name    Delimiter to be used.  --enable-cleartext-plugin                      Enable/disable the clear text authentication plugin.  -e, --execute=name  Execute command and quit. (Disables --force and history                      file.)  -E, --vertical      Print the output of a query (rows) vertically.  -f, --force         Continue even if we get an SQL error.  -G, --named-commands                      Enable named commands. Named commands mean this program's                      internal commands; see mysql> help . When enabled, the                      named commands can be used from any line of the query,                      otherwise only from the first line, before an enter.                      Disable with --disable-named-commands. This option is                      disabled by default.  -i, --ignore-spaces Ignore space after function names.  --init-command=name SQL Command to execute when connecting to MySQL server.                      Will automatically be re-executed when reconnecting.  --local-infile      Enable/disable LOAD DATA LOCAL INFILE.  -b, --no-beep       Turn off beep on error.  -h, --host=name     Connect to host.  -H, --html          Produce HTML output.  -X, --xml           Produce XML output.  --line-numbers      Write line numbers for errors.                      (Defaults to on; use --skip-line-numbers to disable.)  -L, --skip-line-numbers                      Don't write line number for errors.  -n, --unbuffered    Flush buffer after each query.  --column-names      Write column names in results.                      (Defaults to on; use --skip-column-names to disable.)  -N, --skip-column-names                      Don't write column names in results.  --sigint-ignore     Ignore SIGINT (CTRL-C).  -o, --one-database  Ignore statements except those that occur while the                      default database is the one named at the command line.  -p, --password[=name]                      Password to use when connecting to server. If password is                      not given it's asked from the tty.  -W, --pipe          Use named pipes to connect to server.  -P, --port=#        Port number to use for connection or 0 for default to, in                      order of preference, my.cnf, $MYSQL_TCP_PORT,                      /etc/services, built-in default (3306).  --prompt=name       Set the mysql prompt to this value.  --protocol=name     The protocol to use for connection (tcp, socket, pipe,                      memory).  -q, --quick         Don't cache result, print it row by row. This may slow                      down the server if the output is suspended. Doesn't use                      history file.  -r, --raw           Write fields without conversion. Used with --batch.  --reconnect         Reconnect if the connection is lost. Disable with                      --disable-reconnect. This option is enabled by default.                      (Defaults to on; use --skip-reconnect to disable.)  -s, --silent        Be more silent. Print results with a tab as separator,                      each row on new line.  --shared-memory-base-name=name                      Base name of shared memory.  -S, --socket=name   The socket file to use for connection.  --ssl               Enable SSL for connection (automatically enabled with                      other flags).  --ssl-ca=name       CA file in PEM format (check OpenSSL docs, implies                      --ssl).  --ssl-capath=name   CA directory (check OpenSSL docs, implies --ssl).  --ssl-cert=name     X509 cert in PEM format (implies --ssl).  --ssl-cipher=name   SSL cipher to use (implies --ssl).  --ssl-key=name      X509 key in PEM format (implies --ssl).  --ssl-verify-server-cert                      Verify server's "Common Name" in its cert against                      hostname used when connecting. This option is disabled by                      default.  -t, --table         Output in table format.  --tee=name          Append everything into outfile. See interactive help (h)                      also. Does not work in batch mode. Disable with                      --disable-tee. This option is disabled by default.  -u, --user=name     User for login if not current user.  -U, --safe-updates  Only allow UPDATE and DELETE that uses keys.  -U, --i-am-a-dummy  Synonym for option --safe-updates, -U.  -v, --verbose       Write more. (-v -v -v gives the table output format).  -V, --version       Output version information and exit.  -w, --wait          Wait and retry if connection is down.  --connect-timeout=# Number of seconds before connection timeout.  --max-allowed-packet=#                      The maximum packet length to send to or receive from                      server.  --net-buffer-length=#                      The buffer size for TCP/IP and socket communication.  --select-limit=#    Automatic limit for SELECT when using --safe-updates.  --max-join-size=#   Automatic limit for rows in a join when using                      --safe-updates.  --secure-auth       Refuse client connecting to server if it uses old                      (pre-4.1.1) protocol.  --server-arg=name   Send embedded server this as a parameter.  --show-warnings     Show warnings after every statement.  --plugin-dir=name   Directory for client-side plugins.  --default-auth=name Default authentication client-side plugin to use.Default options are read from the following files in the given order:C:Windowsmy.ini C:Windowsmy.cnf C:my.ini C:my.cnf C:Program Files (x86)MySQLMySQL Server 5.5my.ini C:Program Files (x86)MySQLMySQL Server 5.5my.cnfThe following groups are read: mysql clientThe following options may be given as the first argument:--print-defaults        Print the program argument list and exit.--no-defaults           Don't read default options from any option file.--defaults-file=#       Only read default options from the given file #.--defaults-extra-file=# Read this file after the global files are read.Variables (--variable-name=value)and boolean options {FALSE|TRUE}  Value (after reading options)--------------------------------- ----------------------------------------auto-rehash                       TRUEauto-vertical-output              FALSEcharacter-sets-dir                (No default value)column-type-info                  FALSEcomments                          FALSEcompress                          FALSEdebug-check                       FALSEdebug-info                        FALSEdatabase                          (No default value)default-character-set             utf8delimiter                         ;enable-cleartext-plugin           FALSEvertical                          FALSEforce                             FALSEnamed-commands                    FALSEignore-spaces                     FALSEinit-command                      (No default value)local-infile                      FALSEno-beep                           FALSEhost                              (No default value)html                              FALSExml                               FALSEline-numbers                      TRUEunbuffered                        FALSEcolumn-names                      TRUEsigint-ignore                     FALSEport                              3306prompt                            mysql>quick                             FALSEraw                               FALSEreconnect                         TRUEshared-memory-base-name           (No default value)socket                            (No default value)ssl                               FALSEssl-ca                            (No default value)ssl-capath                        (No default value)ssl-cert                          (No default value)ssl-cipher                        (No default value)ssl-key                           (No default value)ssl-verify-server-cert            FALSEtable                             FALSEuser                              (No default value)safe-updates                      FALSEi-am-a-dummy                      FALSEconnect-timeout                   0max-allowed-packet                16777216net-buffer-length                 16384select-limit                      1000max-join-size                     1000000secure-auth                       FALSEshow-warnings                     FALSEplugin-dir                        (No default value)default-auth                      (No default value)exit命令C:UsersAdministrator>mysql -hlocalhost -uroot -pEnter password: ********Welcome to the MySQL monitor.  Commands end with ; or g.Your MySQL connection id is 2Server version: 5.5.27 MySQL Community Server (GPL)Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.Oracle is a registered trademark of Oracle Corporation and/or itsaffiliates. Other names may be trademarks of their respectiveowners.Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.mysql> help;For information about MySQL products and services, visit:   http://www.mysql.com/For developer information, including the MySQL Reference Manual, visit:   http://dev.mysql.com/To buy MySQL Enterprise support, training, or other products, visit:   https://shop.mysql.com/List of all MySQL commands:Note that all text commands must be first on line and end with ';'?         (?) Synonym for `help'.clear     (c) Clear the current input statement.connect   (r) Reconnect to the server. Optional arguments are db and host.delimiter (d) Set statement delimiter.ego       (G) Send command to mysql server, display result vertically.exit      (q) Exit mysql. Same as quit.go        (g) Send command to mysql server.help      (h) Display this help.notee     (t) Don't write into outfile.print     (p) Print current command.prompt    (R) Change your mysql prompt.quit      (q) Quit mysql.rehash    (#) Rebuild completion hash.source    (.) Execute an SQL script file. Takes a file name as an argument.status    (s) Get status information from the server.tee       (T) Set outfile [to_outfile]. Append everything into given outfile.use       (u) Use another database. Takes database name as argument.charset   (C) Switch to another charset. Might be needed for processing binlogwith multi-byte charsets.warnings  (W) Show warnings after every statement.nowarning (w) Don't show warnings after every statement.For server side help, type 'help contents'

相关推荐:

linux系统下将php和mysql命令加入到环境变量中的方法

18个常用的MySQL命令

Fig Fig

下一代命令行工具,内置AI终端命令自动补全

Fig 98 查看详情 Fig

常用的MySQL命令分享

以上就是最全mysql命令的详细内容,更多请关注创想鸟其它相关文章!

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 chuangxiangniao@163.com 举报,一经查实,本站将立刻删除。
发布者:程序猿,转转请注明出处:https://www.chuangxiangniao.com/p/892156.html

赞 (0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
win11玩LOL掉帧怎么办 Win11英雄联盟游戏性能优化设置
上一篇 2025年11月28日 15:39:50
一加9pro怎么开启红包提醒_一加9pro开启红包提醒的方法
下一篇 2025年11月28日 15:39:53

相关推荐

  • VSCode如何优化多语言混编 VSCode复合工程项目的管理技巧

    #%#$#%@%@%$#%$#%#%#$%@_e2fc++805085e25c9761616c00e065bfe8处理多语言混编和复杂项目的核心策略是使用多根工作区(multi-root workspace),通过创建.code-workspace文件将不同语言或模块的目录统一管理,实现跨项目文件浏…

    2026年9月24日
    000
  • Java中接口常量和类常量的使用区别

    接口常量默认public static final,用于行为契约但易导致职责模糊;类常量可用不同访问修饰符,更适合封装和维护。现代Java推荐使用专用常量类、枚举、私有静态常量或配置文件管理常量,以提升代码清晰度与可维护性。 Java中接口常量和类常量,核心区别在于它们的定义位置和隐式属性。接口常量…

    2026年9月24日
    000
  • AI PC的概念是炒作还是未来趋势?

    AI PC正通过专用芯片、本地化智能和新交互模式重塑个人电脑。专用NPU算力突破50TOPS,使设备可高效运行图像识别、语音分析等AI任务,实现快速安全的本地处理;高通在骁龙X Elite上运行130亿参数大模型,微软Windows 11原生支持本地AI,让文档润色、图像修复等操作可在无网环境下完成…

    2026年9月24日
    200
  • 文字生成图片的AI工具2025十大好用推荐

    2025年热门AI文生图工具包括DALL-E 3、Midjourney、Stable Diffusion XL等,具备高图像质量、快速生成、强语义理解与精细风格控制,适用于不同用户需求,未来趋势指向更高清、更智能、更集成的创作生态。 ☞☞☞AI 智能聊天, 问答助手, AI 智能搜索, 免费无限量使…

    2026年9月24日
    100
  • 处理PHP多线程的定时任务并行_优化php多线程怎么实现的定时任务执行

    PHP可通过多进程、消息队列等方式实现定时任务并行处理。1. 使用pthreads扩展(需ZTS支持)可在CLI环境实现多线程,但部署复杂;2. 利用pcntl_fork创建子进程是推荐方案,通过fork多个进程并行执行任务,适合CLI模式;3. 通过crontab同时触发多个独立脚本或使用exec…

    2026年9月24日
    200
  • 怎样处理C++中的野指针问题 空指针检测与防御性编程

    怎样处理C++中的野指针问题 空指针检测与防御性编程怎样处理C++中的野指针问题 空指针检测与防御性编程怎样处理C++中的野指针问题 空指针检测与防御性编程怎样处理C++中的野指针问题 空指针检测与防御性编程

    野指针难以发现是因为其指向已失效或非法内存,解引用会导致未定义行为。1. 初始化是关键防线,声明指针时必须赋初值或设为nullptr;2. 使用智能指针std::unique_ptr和std::shared_ptr可自动管理内存生命周期,避免手动delete遗漏;3. 防御性编程要求每次使用指针前进…

    2026年9月24日 • 用户投稿
    200
  • 360浏览器怎么关闭网页预加载_360浏览器禁用后台预加载提升性能设置

    关闭360浏览器预加载功能可减少资源占用,依次通过设置中心关闭网页预加载、禁用加速功能、修改隐私与安全设置限制后台行为。 如果您发现360浏览器在后台自动预加载网页,导致系统资源占用较高或网络变慢,可能是由于浏览器的智能预加载功能正在运行。该功能会提前加载您可能访问的网页内容以提升浏览速度,但同时也…

    2026年9月24日
    100
  • mysql中in的用法详解 mysql in查询全面解析

    in操作符在mysql中用于检查值是否在指定列表内。1) 基本用法:select from users where name in (‘john’, ‘jane’, ‘jack’)。2) 子查询用法:select from or…

    2026年9月24日
    000
  • php数据如何实现文件断点续传_php数据大文件上传解决方案

    断点续传通过文件分片、唯一hash标识、服务端记录上传状态实现,前端切片上传并查询已传分片,PHP后端存储分片并在完成后合并,同时提供状态接口支持续传,需注意hash一致性与临时文件清理。 大文件上传在Web开发中是个常见需求,尤其是涉及视频、备份文件或资源包时。PHP本身对文件上传有一定限制,但通…

    2026年9月24日
    000
  • VS Code工作台UI:自定义CSS与视图容器配置

    可通过扩展和配置自定义VS Code UI:1. 使用Custom CSS and JS Loader注入CSS修改外观,但有风险;2. 推荐创建Color Theme扩展,通过JSON定义主题颜色;3. 利用viewsContainers在活动栏添加自定义容器;4. 用户可设置view.locat…

    2026年9月24日
    000
  • OmniHuman-1.5— 字节推出的数字人动画生成模型

    OmniHuman-1.5— 字节推出的数字人动画生成模型OmniHuman-1.5— 字节推出的数字人动画生成模型OmniHuman-1.5— 字节推出的数字人动画生成模型OmniHuman-1.5— 字节推出的数字人动画生成模型

    ☞☞☞AI 智能聊天, 问答助手, AI 智能搜索, 免费无限量使用 DeepSeek R1 模型☜☜☜ 怪兽AI数字人 数字人短视频创作,数字人直播,实时驱动数字人 44 查看详情 OmniHuman-1.5是什么 omnihuman-1.5 是由字节跳动推出的一款前沿ai模型,能够基于单张静态图…

    2026年9月24日 • 用户投稿
    100
  • PHP 中如何将 JSON 数组值声明为变量

    本文介绍了如何在 PHP 中从数据库获取数据并将其编码为 JSON 格式,然后通过 AJAX 请求传递到另一个页面。重点讲解了如何在接收页面解析 JSON 数据,并将 JSON 数组中的特定值提取并赋值给变量,以便在后续的 PHP 函数中使用。 从数据库获取数据并编码为 JSON 首先,我们需要从数…

    2026年9月24日
    000
  • 行业首款风水双冷手机 红魔11 Pro系列真机开箱:酷炫水冷环、唯一纯平后盖

    行业首款风水双冷手机 红魔11 Pro系列真机开箱:酷炫水冷环、唯一纯平后盖行业首款风水双冷手机 红魔11 Pro系列真机开箱:酷炫水冷环、唯一纯平后盖行业首款风水双冷手机 红魔11 Pro系列真机开箱:酷炫水冷环、唯一纯平后盖行业首款风水双冷手机 红魔11 Pro系列真机开箱:酷炫水冷环、唯一纯平后盖

    10月13日,红魔正式宣布其新款旗舰手机——红魔11 pro系列将于10月17日发布,这款机型将成为全球首款融合风冷与水冷双重散热技术的智能手机。 今天,红魔游戏手机官方首次展示了红魔11 Pro系列的真机开箱画面。新机共推出四种配色方案:氘锋透明暗夜、氘锋透明银翼、暗夜骑士以及银翼战神,满足不同用…

    2026年9月24日 • 用户投稿
    200
  • 装机时最容易犯的错误是什么?

    忽视防静电措施会导致硬件损伤,操作前应洗手触摸金属并佩戴防静电手环;2. 主板铜柱安装错误易引发短路,需对照孔位准确安装;3. 电源接线漏插24pin或8pin供电是开机失败主因;4. 散热器安装不当致高温,硅脂应居中豌豆大小并确保扣紧。 装机时最容易犯的错误是忽略静电防护和接线混乱。这两个问题看似…

    2026年9月24日
    100
  • VSCode如何调试React前端应用 VSCode调试React组件的完整教程

    要调试react前端应用,首先需安装vscode的浏览器调试插件并配置launch.json文件,1. 安装“debugger for chrome”或对应浏览器的插件;2. 在项目根目录的.vscode文件夹中创建launch.json,配置type为chrome、request为launch、n…

    2026年9月24日
    100
  • Linux中如何安装Git工具_Linux安装Git工具的详细教程

    在Linux系统中安装Git工具是进行版本控制的第一步,尤其对于开发者来说非常关键。不同Linux发行版使用不同的包管理器,因此安装方式略有差异。下面将介绍在主流Linux系统中安装Git的详细步骤。 1. 在Ubuntu/Debian系统中安装Git Ubuntu和Debian系统使用apt作为包…

    2026年9月24日
    100
  • gpt-realtime— OpenAI最新推出的语音模型

    gpt-realtime— OpenAI最新推出的语音模型gpt-realtime— OpenAI最新推出的语音模型gpt-realtime— OpenAI最新推出的语音模型gpt-realtime— OpenAI最新推出的语音模型

    ☞☞☞AI 智能聊天, 问答助手, AI 智能搜索, 免费无限量使用 DeepSeek R1 模型☜☜☜ OpenAI Codex 可以生成十多种编程语言的工作代码,基于 OpenAI GPT-3 的自然语言处理模型 57 查看详情 gpt-realtime 是什么 gpt-realtime 是 o…

    2026年9月24日 • 用户投稿
    100
  • VSCode如何通过Dev Containers开发 VSCode开发容器环境的搭建与使用

    vscode通过dev containers提供容器化开发环境,解决了“在我的机器上能运行”的问题。1. 安装docker并配置vscode访问;2. 安装remote – containers扩展;3. 创建.devcontainer文件夹和devcontainer.json文件;4.…

    2026年9月24日
    100
  • MACA: 一款自动注释细胞类型的工具

    前言 设计的初衷在目前的细胞类型鉴定工具中,支持向量机(SVM)的准确性超过了大多数监督注释方法。然而,由于监督注释方法在大多数单细胞数据中缺乏真实参照,因此其易用性不如非监督方法,这也是非监督方法占主流的原因之一。使用非监督方法时,需要人工介入,调整分群的分辨率,并提供标记基因,这会导致选择标记基…

    2026年9月24日
    000
  • 数据库设计原则?——规范化理论

    数据库设计原则?——规范化理论数据库设计原则?——规范化理论数据库设计原则?——规范化理论数据库设计原则?——规范化理论

    数据库设计的规范化理论旨在减少冗余、提升一致性与完整性,核心是通过1nf、2nf、3nf三级范式逐步消除数据异常。1nf要求字段具有原子性,不可再分;2nf要求非主键字段完全依赖主键,而非部分依赖;3nf进一步消除传递依赖,确保非主键字段不依赖其他非主键字段。规范化虽能提高数据可靠性,但可能导致查询…

    2026年9月24日 • 用户投稿
    000

发表回复

登录后才能评论
关注微信