search
HomeDatabaseMysql TutorialMySQL 基础常用命令_MySQL

bitsCN.com 一、启动与关闭

1.1 Linux下启动mysql 的命令:

  • a. rpm包安装:service mysqld start
  • b. 源码包安装:/usr/local/mysql/bin/mysqld_safe --user=mysql &

1.2 Linux下重启mysql 的命令:

  • a. rpm包安装:service mysqld restart
  • b. 源码包安装:
    • 先关闭mysql

      /usr/local/mysql/bin/mysqladmin -uroot -p shutdown

    • 再启动mysql/usr/local/mysql/bin/mysqld_safe --user=mysql &

1.3 Linux下关闭mysql 的命令:

  • a. rpm包安装:service mysqld stop
  • b. 源码包安装:
    • 方法1、/usr/local/mysql/bin/mysqladmin -uroot -p shutdown
    • 方法2、killall mysqld           //强行终止MySQL数据库服务,有可能导致表损坏,不建议使用

二、数据库连接

2.1 连接MySQL

格式:$mysql_dir/bin/mysql [-h主机地址] -u用户名 -p用户密码,回车后提示输入密码。

2.2 退出MySQL

格式:exit/quit

 

三、修改密码

3.1 mysqladmin 命令

格式:mysqladmin -u用户名 -p旧密码 password 新密码

例1:给root加个密码123456。首先在终端下进入目录$mysql_dir/bin,然后键入以下命令

./mysqladmin -uroot password ’123456′

注:因为开始时root没有密码,所以-p旧密码一项就可以省略了。

例2:再将root的密码改为abc123。

./mysqladmin -uroot -p123456 password abc123

3.2 UPDATE user 语句

首先使用root 帐户登入mysql,然后执行:

UPDATE mysql.user SET password=PASSWORD('123456') WHERE user='root';FLUSH PRIVILEGES;

3.3 SET PASSWORD 语句

同样,首先使用root 帐户登入mysql,然后执行:

SET PASSWORD FOR 'root'@'localhost' = PASSWORD('abc123');

四、创建用户与授权

4.1 CREATE USER

CREATE USER user [IDENTIFIED BY [PASSWORD] 'password']    [, user [IDENTIFIED BY [PASSWORD] 'password']] ...

CREATE USER用于创建新的MySQL账户。要使用CREATE USER,您必须拥有mysql 数据库的全局CREATE USER权限,或拥有INSERT权限。对于每个账户,CREATE USER会在没有权限的mysql.user表中创建一个新记录。如果账户已经存在,则出现错误。

使用自选的IDENTIFIED BY子句,可以为账户指定一个密码。user值和密码的给定方法和GRANT语句一样。特别要注意的是,要在纯文本中指定密码,需忽略PASSWORD关键词。要把密码指定为由PASSWORD()函数返回的混编值,需包含关键字PASSWORD。

例1:创建新用户david & sandy

mysql> create user 'david'@'localhost' identified by 'password';Query OK, 0 rows affected (0.00 sec)mysql>
mysql> create user 'sandy'@'localhost' identified by PASSWORD '*2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19';Query OK, 0 rows affected (0.00 sec)mysql>

4.2 使用GRANT语句

最好的方法是使用GRANT语句,因为这样更精确,错误少。从MySQL 3.22.11起提供了GRANT;它的主要用途是来给帐户授权的,但也可用来建立新帐户并同时授权。

注意:当mysql 运行于no_auto_create_user 时要提供新建用户的密码,否则不能创建新用户。

格式:

GRANT privileges ON databasename.tablename TO 'username'@'host' identified by 'password'; 

例1、增加一个用户test1,密码为abc,让他可以在任何主机上登录,并对所有数据库拥有所有权限。

首先用以root用户连入MySQL,然后键入以下命令:

grant all privileges on *.* to 'test1'@'%' identified  by 'abc';flush privileges;

例2、增加一个用户test2,密码为abc,让他只可以在localhost上登录,并可以对数据库david进行查询、插入、修改、删除的操作。

grant select,insert,update,delete on david.* to 'test2'@'localhost' identified by 'abc';flush privileges;

如果不想test2有密码,可以再打一个命令将密码消掉。

grant select,insert,update,delete on david.* to 'test2'@'localhost' identified by '';

grant 更多用法,请自行Google+Baidu。

4.3 直接操作MySQL授权表

除了GRANT,你可以直接用INSERT语句创建相同的账户,然后使用FLUSH PRIVILEGES告诉服务器重载授权表。

例1:创建用户test3,让其具有同4.2 例2中test2用户同样的权限。

mysql> insert into mysql.user (Host, User, Password, Select_priv, Insert_priv, Update_priv, Delete_priv) values('localhost', 'test3', PASSWORD('password'),'Y','Y','Y','Y');Query OK, 1 row affected, 3 warnings (0.00 sec)mysql> flush privileges;Query OK, 0 rows affected (0.00 sec)mysql> 
mysql> select Host, User, Password, Select_priv, Insert_priv, Update_priv, Delete_priv from mysql.user where User='test3';+-----------+-------+-------------------------------------------+-------------+-------------+-------------+-------------+| Host      | User  | Password                                  | Select_priv | Insert_priv | Update_priv | Delete_priv |+-----------+-------+-------------------------------------------+-------------+-------------+-------------+-------------+| localhost | test3 | *2470C0C06DEE42FD1618BB99005ADCA2EC9D1E19 | Y           | Y           | Y           | Y           | +-----------+-------+-------------------------------------------+-------------+-------------+-------------+-------------+1 row in set (0.00 sec)mysql> 

当用INSERT创建账户时,使用FLUSH PRIVILEGES 的原因是告诉服务器重读授权表。否则,只有重启服务器后更改才会生效。使用 GRANT,则不需要使用FLUSH PRIVILEGES。

用INSERT语句时,使用PASSWORD()函数是为了加密密码。GRANT语句自动加密密码,因此不需要PASSWORD()。

'Y' 值启用账户权限。

五、库操作

必须首先登录到mysql 中,有关操作都是在mysql 的提示符下进行,而且每个命令以分号结束。

5.1 创建数据库

命令:create database ;

例1:创建一个名为test 的数据库

mysql> create database test;Query OK, 1 row affected (0.00 sec)mysql>

5.2 显示所有的数据库

命令:show databases;(注意:最后有个s)

mysql> show databases;+--------------------+| Database           |+--------------------+| information_schema | | david              | | mysql              | | test               | +--------------------+4 rows in set (0.00 sec)mysql> 

5.3 删除数据库

命令:drop database ;

例2:删除名为test 的数据库

mysql> drop database test;Query OK, 0 rows affected (0.00 sec)mysql> 

5.4 连接数据库

命令: use ;

例3:连接david 数据库

mysql> use david;Database changedmysql> 

5.5 查看当前使用的数据库

命令:select database();

mysql> select database();+------------+| database() |+------------+| david      | +------------+1 row in set (0.00 sec)mysql> 

5.6 当前数据库包含的表信息

命令:show tables;(注意:最后有个s)

mysql> show tables;+-----------------+| Tables_in_david |+-----------------+| emp             | +-----------------+1 row in set (0.00 sec)mysql> 

六、表操作

操作之前应连接某个数据库。

6.1 建立表

create table  (  [,.. ]);create table tablename (col1 type1 [not null] [primary key],col2 type2 [not null],..);
mysql> create table myclass (    -> id int(4) not null primary key auto_increment,    -> name char(20) not null,    -> sex int(4) not null default '0',    -> degree double(16,2));Query OK, 0 rows affected (0.04 sec)mysql> 

补充:根据已有的表创建新表。

create table tab_new like tab_old; (只有表结构)<br><br>create table tab_new as select * from tab_old; (既包含表结构,又包含表数据)

只包含表结构:

mysql> create table myclass2 like myclass;Query OK, 0 rows affected (0.00 sec)mysql> 

既包含表结构,又包含表数据:

mysql> insert into myclass values(1, 'david', 1, 20130417.16);Query OK, 1 row affected (0.02 sec)mysql> mysql> mysql> create table myclass3 as select * from myclass;Query OK, 1 row affected (0.07 sec)Records: 1  Duplicates: 0  Warnings: 0mysql> select * from myclass3;+----+-------+-----+-------------+| id | name  | sex | degree      |+----+-------+-----+-------------+|  1 | david |   1 | 20130417.16 | +----+-------+-----+-------------+1 row in set (0.02 sec)mysql> 

6.2 获取表结构

命令:

desc 表名;orshow columns from 表名;

获取myclass & myclass2 表结构

mysql> desc myclass;+--------+--------------+------+-----+---------+----------------+| Field  | Type         | Null | Key | Default | Extra          |+--------+--------------+------+-----+---------+----------------+| id     | int(4)       | NO   | PRI | NULL    | auto_increment | | name   | char(20)     | NO   |     |         |                | | sex    | int(4)       | NO   |     | 0       |                | | degree | double(16,2) | YES  |     | NULL    |                | +--------+--------------+------+-----+---------+----------------+4 rows in set (0.00 sec)mysql> show columns from myclass2;+--------+--------------+------+-----+---------+----------------+| Field  | Type         | Null | Key | Default | Extra          |+--------+--------------+------+-----+---------+----------------+| id     | int(4)       | NO   | PRI | NULL    | auto_increment | | name   | char(20)     | NO   |     |         |                | | sex    | int(4)       | NO   |     | 0       |                | | degree | double(16,2) | YES  |     | NULL    |                | +--------+--------------+------+-----+---------+----------------+4 rows in set (0.00 sec)mysql> 

6.3 删除表

命令:drop table ;

例:删除表名为 myclass3 的表

mysql> drop table myclass3;Query OK, 0 rows affected (0.00 sec)mysql> show tables;+-----------------+| Tables_in_david |+-----------------+| emp             | | myclass         | | myclass2        | +-----------------+3 rows in set (0.00 sec)mysql> 

6.4 更改表名

命令:rename table 原表名 to 新表名;

例:将表 myclass2 名字更改为 myclass4

mysql> rename table myclass2 to myclass4;Query OK, 0 rows affected (0.02 sec)mysql> show tables;+-----------------+| Tables_in_david |+-----------------+| emp             | | myclass         | | myclass4        | +-----------------+3 rows in set (0.00 sec)mysql> 

6.5 在表中增加字段

命令:alter table 表名 add 字段 类型 其他;

例:在表 myclass 中添加了一个字段passtest,类型为int(4),默认值为0。

mysql> alter table myclass add passtest int(4) default '0';Query OK, 1 row affected (0.04 sec)Records: 1  Duplicates: 0  Warnings: 0mysql> desc myclass;+----------+--------------+------+-----+---------+----------------+| Field    | Type         | Null | Key | Default | Extra          |+----------+--------------+------+-----+---------+----------------+| id       | int(4)       | NO   | PRI | NULL    | auto_increment | | name     | char(20)     | NO   |     |         |                | | sex      | int(4)       | NO   |     | 0       |                | | degree   | double(16,2) | YES  |     | NULL    |                | | passtest | int(4)       | YES  |     | 0       |                | +----------+--------------+------+-----+---------+----------------+5 rows in set (0.00 sec)mysql> 

七、数据操作

7.1 插入数据

命令:insert into [( [,.. ])] values ( 值1 )[, ( 值n )];

例:向 myclass 表中插入以下记录,留空的表示使用默认值。

mysql> insert into myclass (id, name, sex, degree, passtest) values(1, 'david', 1, 80.56, 78);     Query OK, 1 row affected (0.00 sec)mysql> insert into myclass values(2, 'sandy', 0, 100, 90);Query OK, 1 row affected (0.00 sec)mysql> insert into myclass (id, name, sex, degree) values(3, 'renee', 0, 90.34);Query OK, 1 row affected (0.00 sec)mysql> insert into myclass (id, name) values(4, 'china');Query OK, 1 row affected (0.00 sec)mysql>

7.2 查询表中的数据

a. 查询所有行

命令:select from where ;

例1:查看表 myclass 中所有数据

mysql> select * from myclass;+----+-------+-----+--------+----------+| id | name  | sex | degree | passtest |+----+-------+-----+--------+----------+|  1 | david |   1 |  80.56 |       78 | |  2 | sandy |   0 | 100.00 |       90 | |  3 | renee |   0 |  90.34 |        0 | |  4 | china |   0 |   NULL |        0 | +----+-------+-----+--------+----------+4 rows in set (0.00 sec)mysql> 

例2:查询表 david 相关信息

mysql> select * from myclass where name='david';+----+-------+-----+--------+----------+| id | name  | sex | degree | passtest |+----+-------+-----+--------+----------+|  1 | david |   1 |  80.56 |       78 | +----+-------+-----+--------+----------+1 row in set (0.00 sec)mysql> 

b. 查询前几行数据

例如:查看表 myclass 中前2行数据

mysql> select * from myclass limit 2;+----+-------+-----+--------+----------+| id | name  | sex | degree | passtest |+----+-------+-----+--------+----------+|  1 | david |   1 |  80.56 |       78 | |  2 | sandy |   0 | 100.00 |       90 | +----+-------+-----+--------+----------+2 rows in set (0.00 sec)mysql>

或者:

mysql> select * from myclass order by id limit 2;+----+-------+-----+--------+----------+| id | name  | sex | degree | passtest |+----+-------+-----+--------+----------+|  1 | david |   1 |  80.56 |       78 | |  2 | sandy |   0 | 100.00 |       90 | +----+-------+-----+--------+----------+2 rows in set (0.01 sec)mysql> 

7.3 删除表中的数据

命令:delete from 表名 where 表达式;

例如:删除表 myclass 中编号为4的记录

mysql> delete from myclass where id=4;Query OK, 1 row affected (0.00 sec)mysql> select * from myclass;+----+-------+-----+--------+----------+| id | name  | sex | degree | passtest |+----+-------+-----+--------+----------+|  1 | david |   1 |  80.56 |       78 | |  2 | sandy |   0 | 100.00 |       90 | |  3 | renee |   0 |  90.34 |        0 | +----+-------+-----+--------+----------+3 rows in set (0.00 sec)mysql> 

7.4 修改表中的数据

update 表名 set 字段 = 新值,… where 条件;<br>

例:修改 myclass 表中编号为1的记录,将degree 值改成89.99

mysql> update myclass set degree=89.99 where id=1;Query OK, 1 row affected (0.00 sec)Rows matched: 1  Changed: 1  Warnings: 0mysql> select * from myclass;+----+-------+-----+--------+----------+| id | name  | sex | degree | passtest |+----+-------+-----+--------+----------+|  1 | david |   1 |  89.99 |       78 | |  2 | sandy |   0 | 100.00 |       90 | |  3 | renee |   0 |  90.34 |        0 | +----+-------+-----+--------+----------+3 rows in set (0.00 sec)mysql> 

八、数据的导入导出

8.1 导出整个数据库

命令:mysqldump -u 用户名 -p 数据库名 > 导出的文件名

[root@TS-DEV bin]# ./mysqldump -uroot -p david > /tmp/david/david.sqlEnter password: [root@TS-DEV bin]# ll /tmp/david/total 4-rw-r--r-- 1 root root 2764 Apr 17 17:13 david.sql[root@TS-DEV bin]# 

8.2 导出一个表

命令:mysqldump -u 用户名 -p 数据库名 表名> 导出的文件名

[root@TS-DEV bin]# ./mysqldump -uroot -p david myclass > /tmp/david/david_myclass.sqlEnter password: [root@TS-DEV bin]# ll /tmp/david/total 8-rw-r--r-- 1 root root 1854 Apr 17 17:16 david_myclass.sql-rw-r--r-- 1 root root 2764 Apr 17 17:13 david.sql[root@TS-DEV bin]# 

8.3 导出一个数据库结构

命令:mysqldump -u root -p -d --add-drop-table test > test_db.sql

-d 没有数据 --add-drop-table 在每个create 语句之前增加一个drop table

[root@TS-DEV bin]# ./mysqldump -uroot -p -d --add-drop-table david > /tmp/david/david_db.sqlEnter password: [root@TS-DEV bin]# 

8.4 导入数据库

a. 常用source 命令

进入mysql 数据库控制台

# ./mysql -uroot -p

mysql> show databases;+--------------------+| Database           |+--------------------+| information_schema | | mysql              | +--------------------+2 rows in set (0.00 sec)mysql> create database sandy;Query OK, 1 row affected (0.00 sec)mysql> show databases;+--------------------+| Database           |+--------------------+| information_schema | | mysql              | | sandy              | +--------------------+3 rows in set (0.00 sec)mysql> use sandyDatabase changedmysql> source /tmp/david/david.sqlQuery OK, 0 rows affected (0.00 sec)...Query OK, 2 rows affected (0.00 sec)Records: 2  Duplicates: 0  Warnings: 0...Query OK, 3 rows affected (0.00 sec)Records: 3  Duplicates: 0  Warnings: 0...Query OK, 0 rows affected (0.00 sec)mysql> show tables;+-----------------+| Tables_in_sandy |+-----------------+| emp             | | myclass         | | myclass4        | +-----------------+3 rows in set (0.00 sec)mysql> select * from emp;+------+-------+| id   | name  |+------+-------+|    1 | david | |    2 | sandy | +------+-------+2 rows in set (0.00 sec)mysql> 

b. 使用mysql 命令

先创建要导入的数据库 renee。

mysql> create database renee;Query OK, 1 row affected (0.00 sec)mysql> show databases;+--------------------+| Database           |+--------------------+| information_schema | | mysql              | | renee              | | sandy              | +--------------------+4 rows in set (0.00 sec)mysql> 

导入数据

[root@TS-DEV bin]# ./mysql -uroot -p -D renee <p>查看数据</p><pre class="brush:php;toolbar:false">mysql> use renee;Database changedmysql> show tables;+-----------------+| Tables_in_renee |+-----------------+| myclass         | +-----------------+1 row in set (0.00 sec)mysql> select * from myclass;+----+-------+-----+--------+----------+| id | name  | sex | degree | passtest |+----+-------+-----+--------+----------+|  1 | david |   1 |  89.99 |       78 | |  2 | sandy |   0 | 100.00 |       90 | |  3 | nancy |   0 |  90.34 |        0 | +----+-------+-----+--------+----------+3 rows in set (0.00 sec)mysql> 

更多导入导出命令,请自行Google+Baidu。

bitsCN.com
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
How does MySQL index cardinality affect query performance?How does MySQL index cardinality affect query performance?Apr 14, 2025 am 12:18 AM

MySQL index cardinality has a significant impact on query performance: 1. High cardinality index can more effectively narrow the data range and improve query efficiency; 2. Low cardinality index may lead to full table scanning and reduce query performance; 3. In joint index, high cardinality sequences should be placed in front to optimize query.

MySQL: Resources and Tutorials for New UsersMySQL: Resources and Tutorials for New UsersApr 14, 2025 am 12:16 AM

The MySQL learning path includes basic knowledge, core concepts, usage examples, and optimization techniques. 1) Understand basic concepts such as tables, rows, columns, and SQL queries. 2) Learn the definition, working principles and advantages of MySQL. 3) Master basic CRUD operations and advanced usage, such as indexes and stored procedures. 4) Familiar with common error debugging and performance optimization suggestions, such as rational use of indexes and optimization queries. Through these steps, you will have a full grasp of the use and optimization of MySQL.

Real-World MySQL: Examples and Use CasesReal-World MySQL: Examples and Use CasesApr 14, 2025 am 12:15 AM

MySQL's real-world applications include basic database design and complex query optimization. 1) Basic usage: used to store and manage user data, such as inserting, querying, updating and deleting user information. 2) Advanced usage: Handle complex business logic, such as order and inventory management of e-commerce platforms. 3) Performance optimization: Improve performance by rationally using indexes, partition tables and query caches.

SQL Commands in MySQL: Practical ExamplesSQL Commands in MySQL: Practical ExamplesApr 14, 2025 am 12:09 AM

SQL commands in MySQL can be divided into categories such as DDL, DML, DQL, DCL, etc., and are used to create, modify, delete databases and tables, insert, update, delete data, and perform complex query operations. 1. Basic usage includes CREATETABLE creation table, INSERTINTO insert data, and SELECT query data. 2. Advanced usage involves JOIN for table joins, subqueries and GROUPBY for data aggregation. 3. Common errors such as syntax errors, data type mismatch and permission problems can be debugged through syntax checking, data type conversion and permission management. 4. Performance optimization suggestions include using indexes, avoiding full table scanning, optimizing JOIN operations and using transactions to ensure data consistency.

How does InnoDB handle ACID compliance?How does InnoDB handle ACID compliance?Apr 14, 2025 am 12:03 AM

InnoDB achieves atomicity through undolog, consistency and isolation through locking mechanism and MVCC, and persistence through redolog. 1) Atomicity: Use undolog to record the original data to ensure that the transaction can be rolled back. 2) Consistency: Ensure the data consistency through row-level locking and MVCC. 3) Isolation: Supports multiple isolation levels, and REPEATABLEREAD is used by default. 4) Persistence: Use redolog to record modifications to ensure that data is saved for a long time.

MySQL's Place: Databases and ProgrammingMySQL's Place: Databases and ProgrammingApr 13, 2025 am 12:18 AM

MySQL's position in databases and programming is very important. It is an open source relational database management system that is widely used in various application scenarios. 1) MySQL provides efficient data storage, organization and retrieval functions, supporting Web, mobile and enterprise-level systems. 2) It uses a client-server architecture, supports multiple storage engines and index optimization. 3) Basic usages include creating tables and inserting data, and advanced usages involve multi-table JOINs and complex queries. 4) Frequently asked questions such as SQL syntax errors and performance issues can be debugged through the EXPLAIN command and slow query log. 5) Performance optimization methods include rational use of indexes, optimized query and use of caches. Best practices include using transactions and PreparedStatemen

MySQL: From Small Businesses to Large EnterprisesMySQL: From Small Businesses to Large EnterprisesApr 13, 2025 am 12:17 AM

MySQL is suitable for small and large enterprises. 1) Small businesses can use MySQL for basic data management, such as storing customer information. 2) Large enterprises can use MySQL to process massive data and complex business logic to optimize query performance and transaction processing.

What are phantom reads and how does InnoDB prevent them (Next-Key Locking)?What are phantom reads and how does InnoDB prevent them (Next-Key Locking)?Apr 13, 2025 am 12:16 AM

InnoDB effectively prevents phantom reading through Next-KeyLocking mechanism. 1) Next-KeyLocking combines row lock and gap lock to lock records and their gaps to prevent new records from being inserted. 2) In practical applications, by optimizing query and adjusting isolation levels, lock competition can be reduced and concurrency performance can be improved.

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)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

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),