Danh mục

Mysql your visual blueprint for creating open source databases- P15

Số trang: 20      Loại file: pdf      Dung lượng: 519.28 KB      Lượt xem: 11      Lượt tải: 0    
Thu Hiền

Phí tải xuống: 6,000 VND Tải xuống file đầy đủ (20 trang) 0
Xem trước 2 trang đầu tiên của tài liệu này:

Thông tin tài liệu:

Mysql your visual blueprint for creating open source databases- P15:The show tables command displays a list of tables available in the currently selected database. You can use this command when you are unsure of the exact name of a table within the database.
Nội dung trích xuất từ tài liệu:
Mysql your visual blueprint for creating open source databases- P15 MYSQL COMMAND REFERENCE BADMINISTRATIVE COMMANDSM ySQL includes a variety of administrative commands for managing tables, processes, users, and various server components. OPTIMIZE TABLE FLUSH QUERY CACHE The OPTIMIZE TABLE command sorts a tables index This command arranges MySQLs cache of queries in files and reclaims any space used by deleted rows. To memory to conserve memory. Use the command RESET use this command, specify the table name. QUERY CACHE to clear this cache completely. Example: FLUSH TABLES OPTIMIZE TABLE address; This command closes and reopens all MySQL tables, and clears the query cache. CHECK TABLE The CHECK TABLE command checks a table for errors. FLUSH STATUS Specify a table name and optionally one or more of the This command resets most of the status variables that keywords QUICK, FAST, CHANGED, MEDIUM, or EXTENDED. are shown with the SHOW STATUS command. These variables are also cleared each time you start the Example: MySQL server. CHECK TABLE address; KILL REPAIR TABLE This command stops a thread on the MySQL server. The REPAIR TABLE command attempts to repair a Specify the process ID number, available from the damaged table. You can optionally specify the keywords output of SHOW PROCESSLIST. QUICK for a fast scan or EXTENDED for a more thorough scan. Example: KILL 3931; ANALYZE TABLE The ANALYZE TABLE command analyzes a tables GRANT content and configures its keys for use in future queries. The GRANT command grants one or more privileges to a To use this command, specify the table name. user of the MySQL server. If the user does not already exist, it is created. Specify the privileges to grant, the FLUSH HOSTS database and table names, the TO keyword followed by The FLUSH HOSTS command clears the host cache the username, and the IDENTIFIED BY keywords tables MySQL uses to manage access by users from followed by a password. remote hosts. This allows access by users who were previously blocked due to connection errors. Example: GRANT ALL ON testdb.quotes FLUSH LOGS TO fred IDENTIFIED BY password; This command closes and reopens the MySQL log files. It is useful if you have changed logging settings or if you REVOKE are backing up or deleting old data in the log files. The REVOKE command takes away one or more privileges from a user of the MySQL server. Specify the privileges to FLUSH PRIVILEGES revoke, the FROM keyword, and the username. This command reloads the MySQL grant tables, used to control access by users. This is useful if you have made Example: changes to the tables manually. REVOKE ALL ON testdb.quotes FROM fred; 267 APPENDIXCOMMAND-LINE UTILITIESM ySQL includes a number of utilities that can be used from the command prompt on a UNIX or Windows system. These are described in thefollowing sections. MYSQL This command starts the MySQL monitor, a After you are in the MySQL monitor, you can type any MySQL command-line interface that enables you to command. The monitor also supports a number of special enter MySQL commands and view their commands: results. COMMAND DESCRIPTION COMMAND DESCRIPTION \c Clears the current command -? Display a complete list of \e Edits the command in a text editor options \g Executes the current command -D Select a database to use \G Executes the current command and displays a -h Specify the host (server name vertical result or IP address) \h Displays a list of commands and their -p Specify the password to descriptions access the server \p Displays the current command -P Specify the TCP/IP port \q Exits the MySQL monitor number for the server \r Attempts to r ...

Tài liệu được xem nhiều: