search
HomeDatabaseMysql TutorialMySQL 相关的环境变量

所有使用mysqlclient客户库与服务器通信的MySQL客户使用下列环境变量


使用MYSQL_PWD是不安全的。见6.3 与MySQL服务器连接。

  “mysql”客户使用MYSQL_HISTFILE环境变量中命名的文件来保存命令行历史,历史文件的缺省值是“$HOME/.mysql_history”,这里$HOME是HOME环境变量的值。

  所有MySQL程序取许多不同的选项,然而,每个MySQL程序提供一个--help选项,你可以使用它得到程序不同选项的完整描述。例如,试一试mysql --help。

  你能用一个选项文件覆盖所有的标准客户程序的缺省选项。见4.15.4 选择文件。

  下表简单地描述MySQL程序:

  myisamchk

  描述、检查、优化和修复MySQL表的使用程序。因为myisamchk有许多功能,它在其自己的章节中描述。见13 维护MySQL安装。

  make_binary_release

  制作一个编译MySQL的一个二进制的版本。这能用FTP传送到在ftp.tcx.se网站的“/pub/mysql/Incoming”以方便其它MySQL用户。

  msql2mysql

  一个外壳脚本,转换mSQL程序到MySQL。它不能处理所有的情况,但是当转换时,它给出一个好起点。

  mysql

  mysql是一个简单的SQL外壳(具有GNU readline 能力),它支持交互式和非交互式使用。当交互地使用时,查询结果以ASCII表的格式被表示。当非交互地使用时(例如,作为一个过滤器),结果是以定位符分隔的格式表示。(输出格式可以使用命令行选项改变)你可以简单地象这样运行脚本:

  shell> mysql database output.tab

  如果你在客户中由于内存不足造成问题,使用--quick选项!这迫使mysql使用mysql_use_result()而非mysql_store_result()来检索结果集合。

mysqlaccess
  一个脚本,检查对主机、用户和数据库组合的存取权限。

  mysqladmin

  执行管理操作的实用程序,例如创建或抛弃数据库,再装载授权表,清洗表到磁盘中和再打开日志文件。mysqladmin也可以被用来从服务器检索版本,进程和状态信息。见12.2 管理一个 MySQL 服务器。

  mysqlbug

  MySQL错误报告脚本。当填写一份错误报告到MySQL邮件列表时,应该总是使用该脚本。

  mysqld

  SQL守护进程。它应该一直在运行。

  mysqldump

  以SQL语句或定位符分隔的文本文件将一个MySQL数据库倾倒一个文件中。这是最早由Igor Romanenko编写的自由软件的增强版本。见12.3 从MySQL数据库和表倾倒结构和数据。

  mysqlimport

  使用LOAD DATA INFILE将文本文件倒入其各自的表中。见12.4 从文本文件导入数据。

  mysqlshow

  显示数据库,表,列和索引的信息。

  mysql_install_db

  以缺省权限创建MySQL授权表。这通常仅被执行一次。就是在系统上第一次安装MySQL时。

  replace

  一个实用程序,由msql2mysql使用,但是有更一般的适用性。replace改变文件中或标准输入上的字符串。使用一台有限状态机首先匹配更长的字符串,能被用来交换字符串。例如,这个命令在给定的文件中交换a和b:

  shell> replace a b b a -- file1 file2 ...

  safe_mysqld

  一个脚本,用某些更安全的特征启动mysqld守护进程,例如当一个错误发生时,重启服务器并且记载运行时刻信息到一个日志文件中。
Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Explain the ACID properties (Atomicity, Consistency, Isolation, Durability).Explain the ACID properties (Atomicity, Consistency, Isolation, Durability).Apr 16, 2025 am 12:20 AM

ACID attributes include atomicity, consistency, isolation and durability, and are the cornerstone of database design. 1. Atomicity ensures that the transaction is either completely successful or completely failed. 2. Consistency ensures that the database remains consistent before and after a transaction. 3. Isolation ensures that transactions do not interfere with each other. 4. Persistence ensures that data is permanently saved after transaction submission.

MySQL: Database Management System vs. Programming LanguageMySQL: Database Management System vs. Programming LanguageApr 16, 2025 am 12:19 AM

MySQL is not only a database management system (DBMS) but also closely related to programming languages. 1) As a DBMS, MySQL is used to store, organize and retrieve data, and optimizing indexes can improve query performance. 2) Combining SQL with programming languages, embedded in Python, using ORM tools such as SQLAlchemy can simplify operations. 3) Performance optimization includes indexing, querying, caching, library and table division and transaction management.

MySQL: Managing Data with SQL CommandsMySQL: Managing Data with SQL CommandsApr 16, 2025 am 12:19 AM

MySQL uses SQL commands to manage data. 1. Basic commands include SELECT, INSERT, UPDATE and DELETE. 2. Advanced usage involves JOIN, subquery and aggregate functions. 3. Common errors include syntax, logic and performance issues. 4. Optimization tips include using indexes, avoiding SELECT* and using LIMIT.

MySQL's Purpose: Storing and Managing Data EffectivelyMySQL's Purpose: Storing and Managing Data EffectivelyApr 16, 2025 am 12:16 AM

MySQL is an efficient relational database management system suitable for storing and managing data. Its advantages include high-performance queries, flexible transaction processing and rich data types. In practical applications, MySQL is often used in e-commerce platforms, social networks and content management systems, but attention should be paid to performance optimization, data security and scalability.

SQL and MySQL: Understanding the RelationshipSQL and MySQL: Understanding the RelationshipApr 16, 2025 am 12:14 AM

The relationship between SQL and MySQL is the relationship between standard languages ​​and specific implementations. 1.SQL is a standard language used to manage and operate relational databases, allowing data addition, deletion, modification and query. 2.MySQL is a specific database management system that uses SQL as its operating language and provides efficient data storage and management.

Explain the role of InnoDB redo logs and undo logs.Explain the role of InnoDB redo logs and undo logs.Apr 15, 2025 am 12:16 AM

InnoDB uses redologs and undologs to ensure data consistency and reliability. 1.redologs record data page modification to ensure crash recovery and transaction persistence. 2.undologs records the original data value and supports transaction rollback and MVCC.

What are the key metrics to look for in an EXPLAIN output (type, key, rows, Extra)?What are the key metrics to look for in an EXPLAIN output (type, key, rows, Extra)?Apr 15, 2025 am 12:15 AM

Key metrics for EXPLAIN commands include type, key, rows, and Extra. 1) The type reflects the access type of the query. The higher the value, the higher the efficiency, such as const is better than ALL. 2) The key displays the index used, and NULL indicates no index. 3) rows estimates the number of scanned rows, affecting query performance. 4) Extra provides additional information, such as Usingfilesort prompts that it needs to be optimized.

What is the Using temporary status in EXPLAIN and how to avoid it?What is the Using temporary status in EXPLAIN and how to avoid it?Apr 15, 2025 am 12:14 AM

Usingtemporary indicates that the need to create temporary tables in MySQL queries, which are commonly found in ORDERBY using DISTINCT, GROUPBY, or non-indexed columns. You can avoid the occurrence of indexes and rewrite queries and improve query performance. Specifically, when Usingtemporary appears in EXPLAIN output, it means that MySQL needs to create temporary tables to handle queries. This usually occurs when: 1) deduplication or grouping when using DISTINCT or GROUPBY; 2) sort when ORDERBY contains non-index columns; 3) use complex subquery or join operations. Optimization methods include: 1) ORDERBY and GROUPB

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft