Oracle 5.0 Reference Manual page 299

Table of Contents

Advertisement

mysql> SHOW BINARY LOGS;
+---------------+-----------+
| Log_name
+---------------+-----------+
| binlog.000015 |
| binlog.000016 |
+---------------+-----------+
The search string can contain the the wildcard characters "%" and "_". These have the same meaning
as for pattern-matching operations performed with the
returns a list of topics that begin with rep:
%
mysql>
HELP rep%
Many help items for your request exist.
To make a more specific request, please type 'help <item>',
where <item> is one of the following
topics:
REPAIR TABLE
REPEAT FUNCTION
REPEAT LOOP
REPLACE
REPLACE FUNCTION
4.5.1.5. Executing SQL Statements from a Text File
The
client typically is used interactively, like this:
mysql
shell>
mysql db_name
However, it is also possible to put your SQL statements in a file and then tell
from that file. To do so, create a text file
Then invoke
shell>
mysql db_name < text_file
If you place a
database name on the command line:
shell>
mysql < text_file
If you are already running mysql, you can execute an SQL script file using the
command:
\.
mysql>
source file_name
mysql>
\. file_name
Sometimes you may want your script to display progress information to the user. For this you can insert
statements like this:
SELECT '<info_to_display>' AS ' ';
The statement shown outputs <info_to_display>.
You can also invoke
displayed before the result that it produces.
As of MySQL 5.0.54,
input files. Previously, it read them and sent them to the server, resulting in a syntax error. Presence
of a BOM does not cause
option such as
For more information about batch mode, see
— The MySQL Command-Line Tool
mysql
| File_size |
724935 |
733481 |
as shown here:
mysql
statement as the first statement in the file, it is unnecessary to specify the
USE db_name
with the
mysql
ignores Unicode byte order mark (BOM) characters at the beginning of
mysql
to change its default character set. To do that, invoke
mysql
--default-character-set=utf8
LIKE
that contains the statements you wish to execute.
text_file
[270]
option, which causes each statement to be
--verbose
[266].
Section 3.5, "Using
279
[896]
operator. For example,
mysql
source
in Batch
Mode".
mysql
HELP rep
to read its input
command or
with an
mysql

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the 5.0 and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Mysql 5.0

Table of Contents