Perintah Mysql


Daftar Perintah Mysql

? (\?) Synonym for `help’. (Sinonim dari help)
clear (\c) Clear the current input statement. (perintah menghapus)
connect (\r) Reconnect to the server. Optional arguments are db and host. (Menghubungkan kembali kepada database Mysql, dapat disertai dengan option db dan host)
delimiter (\d) Set statement delimiter. (Menetapkan pernyataan pembatas)
edit (\e) Edit command with $EDITOR (Melakukan pengeditan perintah-perintah SQL yang ada di dalam
buffer, dengan menggunakan editor teks default dari sisten Unix)
ego (\G) Send command to mysql server, display result vertically. (Mengirim perintah kepada Mysql, menampilkan hasilnya secara vertical.)
exit (\q) Exit mysql. Same as quit. (Keluar dari Mysql)
go (\G) Send command to mysql server. (mengirim perintah kepada Mysql)
help (\h) Display this help. (Menampilkan daftar perintah di lingkungan MySQL)
notee (\T) Don’t write into outfile. (Mencegah output supaya tidak ditulis ke dalam file)
print (\p) Print current command.
(mencetak perintah saat ini)
prompt (\r) Change your mysql prompt. (mengganti prompt mysql)
quit (\q) Quit mysql. (Keluar dari MySQL)
rehash (\#) Rebuild completion hash. (Membangun Kembali hash).
source (\.) Execute an SQL script file. Takes a file name as an argument. (Mengeksekusi perintah SQL dari dari dalam file)
status (\s) Get status information from the server. (Mendapatkan informasi status dari server)
system (\!) Execute a system shell command. (Menjalankan perintah shell sistem)
tee (\T) Set outfile [to_outfile]. Append everything into given outfile. (Mengarahkan keluar untuk disimpan ke dalam file, selalu menambahkan hasil kepada file output)
use (\u) Use another database. Takes database name as argument. (Membuat/mengganti koneksi kepada database)
warnings (\w) Show warnings after every statement. (Menampilkan peringatan setelah setiap pernyataan.)
nowarning (\w) Don’t show warnings after every statement. (Tidak menampilkan peringatan setelah setiap pernyataan.)

Untuk mempraktekan perintah Mysql di Linux Ubuntu :

1. Masuk terminal

2. Menjalan aplikasi Mysql

$ sudo mysql -u root -p

masukkan password root linux

masukkan password root mysql

Welcome to the MySQL monitor. Commands end with ; or \g.

Your MySQL connection id is 658

Server version: 5.1.58-1ubuntu1 (Ubuntu)

Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.

This software comes with ABSOLUTELY NO WARRANTY. This is free software,

and you are welcome to modify and redistribute it under the GPL v2 license

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the current input statement.

mysql>

3. Menampilkan perintah Mysql

mysql> \h

For information about MySQL products and services, visit:

http://www.mysql.com/

For developer information, including the MySQL Reference Manual, visit:

http://dev.mysql.com/

To buy MySQL Enterprise support, training, or other products, visit:

https://shop.mysql.com/

List of all MySQL commands:

Note that all text commands must be first on line and end with ‘;’

? (\?) Synonym for `help’.

clear (\c) Clear the current input statement.

connect (\r) Reconnect to the server. Optional arguments are db and host.

delimiter (\d) Set statement delimiter.

edit (\e) Edit command with $EDITOR.

ego (\G) Send command to mysql server, display result vertically.

exit (\q) Exit mysql. Same as quit.

go (\g) Send command to mysql server.

help (\h) Display this help.

nopager (\n) Disable pager, print to stdout.

notee (\t) Don’t write into outfile.

pager (\P) Set PAGER [to_pager]. Print the query results via PAGER.

print (\p) Print current command.

prompt (\R) Change your mysql prompt.

quit (\q) Quit mysql.

rehash (\#) Rebuild completion hash.

source (\.) Execute an SQL script file. Takes a file name as an argument.

status (\s) Get status information from the server.

system (\!) Execute a system shell command.

tee (\T) Set outfile [to_outfile]. Append everything into given outfile.

use (\u) Use another database. Takes database name as argument.

charset (\C) Switch to another charset. Might be needed for processing binlog with multi-byte charsets.

warnings (\W) Show warnings after every statement.

nowarning (\w) Don’t show warnings after every statement.

For server side help, type ‘help contents’

3. Keluar Mysql

mysql> \q

$

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s