Oracle 5.0 Reference Manual page 1562

Table of Contents

Advertisement

FLUSH TABLES
recognize the database and read its table definitions.
Running
queries on the SQL node is no different from running them on any other instance of a
SELECT
MySQL server. To run queries from the command line, you first need to log in to the MySQL Monitor in
the usual way (specify the
shell>
mysql -u root -p
Enter password:
Welcome to the MySQL monitor.
Your MySQL connection id is 1 to server version: 5.0.96
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>
We simply use the MySQL server's
security precautions for installing a MySQL server, including setting a strong
information, see
Section 2.18.2, "Securing the Initial MySQL
It is worth taking into account that Cluster nodes do not make use of the MySQL privilege system when
accessing one another. Setting or changing MySQL user accounts (including the
only applications that access the SQL node, not interaction between nodes. See
"MySQL Cluster and MySQL
If you did not modify the
should run the following statements at this point:
mysql>
USE world;
mysql>
ALTER TABLE City ENGINE=NDBCLUSTER;
mysql>
ALTER TABLE Country ENGINE=NDBCLUSTER;
mysql>
ALTER TABLE CountryLanguage ENGINE=NDBCLUSTER;
Selecting a database and running a
accomplished in the usual manner, as is exiting the MySQL Monitor:
mysql>
USE world;
mysql>
SELECT Name, Population FROM City ORDER BY Population DESC LIMIT 5;
+-----------+------------+
| Name
| Population |
+-----------+------------+
| Bombay
|
10500000 |
| Seoul
|
9981619 |
| São Paulo |
9968485 |
| Shanghai
|
9696300 |
| Jakarta
|
9604900 |
+-----------+------------+
5 rows in set (0.34 sec)
mysql>
\q
Bye
shell>
Applications that use MySQL can employ standard APIs to access
remember that your application must access the SQL node, and not the management or data nodes.
This brief example shows how we might execute the
5.X
extension running on a Web server elsewhere on the network:
mysqli
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<title>SIMPLE mysqli SELECT</title>
MySQL Cluster Example with Tables and Data
on each SQL node in the cluster. This causes the node to
password at the
root
Commands end with ; or \g.
account and assume that you have followed the standard
root
Privileges", for more information.
clauses in the table definitions prior to importing the SQL script, you
ENGINE
query against a table in that database is also
SELECT
1542
prompt):
Enter password:
Accounts".
tables. It is important to
NDB
statement just shown by using the PHP
SELECT
password. For more
root
account) effects
root
Section 17.5.10.2,

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents