• Image 1
  • Image 2
  • Image 3
  • Image 4
  • Image 5
  • Image 6
  • Image 7




Sunday, September 30, 2012

VIEW IN MYSQL


Mysql is is a desktop-based programming languages​​, and can also be web-based, because the programming language we often make the MySQL database, which often coexists with PHP. And PHP is a Web-based programming base.


Still the subject of MySQL, but with a different material. Previously I have discussed about the "trigger in mysql" .. Are you already understand the way users or know the function .. If you have not read it, please look at my blog, with the keyword "trigger in mysql".


And for the matter this time I will explain tentan "Views in MySQL" .. whether previously adan have understood the subject this time? or you've never read it, so you do not know this. Therefore let's read this article, and is secured by reading this article your knowledge about views in MySQL will increase ..


1. Views

Views in MySQL is a virtual form of a table view. And Views on the mysql query has been around since the release of MySQL version 5.0. Commands have similar views with the command "select". Since both of these commands are used to display the contents of data (records) from a table contained in a database.


2. Creating Views

Command views are actually used to display multiple columns (fields) of a table atanpa should perform filtering first.


And here's how to create views :

CREATE
[ OR REPLACE ]
[ ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE} ]
[ DEFINER = {user | CURRENT_USER} ]
[ SQL SECURITY {DEFINER | INVOKER} ]
VIEW view_of_name [ (list_of_column) ]
AS select_your_statement
[ WITH [ CASCADED | LOCAL ] CHECK OPTION ]


This is an example if you want to display the name of the hardware and the hardware price of the hardware table :


CREATE VIEW ‘little_part_of_hardware’
AS (select hardware_name, hardware_price
FROM hardware )


3. Deleting View

Removal of view also be useful, which is to reduce the capacity of our database, then the delete command view is created, and this is the command :

DROP VIEW little_part_of_hardware;


Ok.. just it…
I hope you understand..
See you later

Saturday, September 29, 2012

TRIGGER IN MYSQL


Hello my friends the IT knowledge lovers… You are  on my blog  at “We Are Knowledge”.. in here you want to getting and take many IT knowledge, you can get it FREE. You are was choice the right blog, because this is blog to fill many IT knowledge..

Likely this article, discuss about program language “MySQL”, and my tutorial is “TRIGGER IN MYSQL”.. you will know ?? let’s do read this article, have fun and enjoy friends to read…

1. Trigger

Previously you known trigger in Mysql ?. Trigger in mysql  query in MySQL used for calling one command or more than one command in SQL automatically after process update, insert, or delete from the table.

This is usefulness of the trigger :

  • The trigger we can update the data automatically if we want to change the contents of the table.
  • And the second trigger function can also be used to implement a system log, and it will automatically save to the table
  • We can also use the trigger if you want the validation and verification of data before the data is stored in tables.


2. Making New Trigger

You can follow this command, if you will making the new trigger :

Example 1 :

CREATE TRIGGER trigger_name
[BEFORE | AFTER]  [UPDATE | DELETE | INSERT]
ON your_table_name
FOR EACH ROW statement


Explanation :

Before
>> We can determine when the process will be executed (run) "before" process

After
>> We can determine when the process will be executed (run) "after" process

Insert

>> Is to determine the event "insert" on the trigger that will run on command - a command trigger

Update
>> Is to determine the event "Update" on the trigger that will run on command - a command trigger

Delete
>> Is to determine the event "delete" on the trigger that will run on command - a command trigger


3. Deleting Trigger

Because we can create a trigger, we also prepare Mysql command to remove the trigger, and this syntax to remove the trigger

DROP TRIGGER trigger_name. your_table_name;



Ok… just it…
I hope  you understand..
Thank you for visiting…
See you later friends

Friday, September 28, 2012

ADD, DELETE, REPLACE ACCESS RIGHTS IN MYSQL


Hello my friends.. you are on my blog at “We Are Knowledge”…  In here you will getting and take many IT knowledge likely : Mysql, Php, Cobol, Visual Basic 6, and other Program language..

Likely this article to fill IT knowledge, because now, I want giving you tutorial program language MYSQL again, but with different material.. And this is the tutorial :

1. Add and manage user access rights
2. Removing User Access Rightsc and
3. Changing the User Password

You will know all ? let’s do read this article… have fun friend to read my article…


1. Add and manage user access rights

We can also add and set permissions contained in MYSQL programming language .. To add we usually do the command "insert" in the database we have created. Or we can also use the command "grant" and "revoke".

These are a few examples to add permissions :

Example 1 :

GRANT USAGE ON  *.* TO wak@localhost
IDENTIFIED BY ‘knowledge’;

Example 2 :

GRANT ALL PRIVILEGES ON havefun.* TO wak@localhost
IDENTIFIED BY ‘knowledge’ WITH GRANT OPTION;

Example 3 :

GRANT ALL PRIVILEGES ON *.* TO wak@localhost
IDENTIFIED BY ‘knowledge’ WITH GRANT OPTION;


These are a few examples to set permissions :

Example 4 :

GRANT CREATE ON weare.* TO knowledge;
FLUSH PRIVILAGES;

Example 5 :

GRANT ALL PROVILAGES ON weare.* TO knowledge;
FLUSH PRIVILAGES;


2. Removing User Access Rightsc

We can also remove user permissions on the database we have created at MYSQL. we can use the command "REVOKE" to delete user permissions on the database.

These are a few examples to remove permissions :

Example 6 :

REVOKE CREATE ON weare.* FROM knowledge;
FLUSH PROVOLAGES;


3. Changing the User Password

And now we have entered the final discussion, the change password that we created earlier. We can make use of the "update". Since the "update" is the command to change the data that we created earlier in MYSQL, without having to remove up first.

Example 7 :

UPDATE weare SET password = PASSWORD(‘3626’) WHERE
User = ‘admin’ AND host = ‘localhost’;

Example 8 :

SET PASSWORD FOR admin@localhost = “ PASSWORD (‘3226’);
FLUSH PRIVILEGES;



Ok just for it..
I hope you understand..
See you laters..

Thursday, September 27, 2012

GRANT AND REVOKE IN MYSQL



Hi.. Welcome to my blog at “We Are Knowledge”. This blog to fill many IT knowledge.. You can find it. In here to be found IT knowledge from desktop programming until web programming. So let’s do read my article, you can getting or taken FREE..


What do you find ?? About MYSQL ?? If yes.. you was choice the right blog.. because now, I want giving you tutorial about it, and discuss of “GRANT AND REVOKE IN MYSQL”. You know that ?? previously you was ever reading.. ?? If you never reading, so let’s do read my article… have fun and enjoy to read this article friends..


Is a tutorial on setting permissions in MYSQL programming language. And for a time, I would dispose of "REVOKE and GRANT" to set it.


      1. GRANT

Grant in program language MYSQL is Grant is an order that has been provided by the programming language MYSQL to give (make) the right of access permissions for the user (client) in order to access MySQL databases, tables and columns like (insert, update, delete). In addition to the functions at the behest of Grant can also add a new user with this command.

This is a common form using the GRANT command :

GRANT priv_type
ON {table_name | * | *.* | db_name. *}
TO user_name [IDENTIFIED BY ‘your_password’]
[WITH GRANT OPTION]


      2. REVOKE

REVOKE command in MYSQL programming language which is a command to delete or revoke the MySQL user permissions are previously been granted (using GRANT)

This is a common form using the REVOKE command :

REVOKE priv_type
ON {table_name | * | *.* | db_name. *}
FROM your_user_name



      3. OPTION OF PRIV_TYPE
You can choice one for change “prive_type” :
           

 
ALL PRIVILEGES
ALTER
CREATE
DELETE
DROP
FILE
DELETE
INSERT
PROCESS
REFERENCES
RELOAD
SELECT
SHUTDOWN
UPDATE
USAGE
 
Ok.. just it…
I hope you like this
See you later friends…

Wednesday, September 26, 2012

ACCESS RIGHTS IN UNDERSTANDING MYSQL


Hello.. hello my friends, welcome to my blog at “We Are Knowedge”..  Now. You are on my blog… you can look at my blog.  My Blog to fill many IT knowledge. You can get and take it FREE.

Now.. I want add my article about “database” so I want giving you knowledge about it, that is “MYSQL”, but with tutorial different. And for now tutorial is “ACCESS RIGHTS IN UNDERSTANDING MYSQL “. You will know that ? or you will to learn that ? so let’s do read my article… you can add your science.. have fun friends..

first you need to have a program to run, such as: xampp, wampp or sql. anada can choose one of them. without the software that you will not be able to make a program or follow my steps.

In MYSQL we are also required to determine the permissions on the database that we have, who are allowed to access the public or anyone who can not access it in general.
Remedy set, MYSQL has prepared syntax. you can find in it. In the MYSQL database there is a table - a table like this.

You try to read it and understand it. :

A. User

>> usefulness of this table is to store information on MYSQL, information such as user, password and host user, and this table stores information about user permissions


B. Db

>> This table also serves as a repository for information about user permissions to your database.


C. Host

>> For this table serves as a storage computer list, the list can be a computer, IP address, computer name to access his computer


D. Tables_priv

>> And for the following table is used for storing user permissions to a table. More simply, if you create a table using this you can control who can access it and what he can do.


E. Columns_priv

>> Almost the same as the previous bit different on these permissions to columns


F. Procs_priv

>> For these permissions are used to restrict users with procedure

G. Proc

This table is useful for storing information about the listing procedure in MYSQL


H. Func

This table is useful for storing information about the didefinisakan function in MYSQL, almost sma with the previous one, make sure you use the right, should not be confused with the other table functions.



Ok.. just it…
I hope you understand…
See you laters…

Tuesday, September 25, 2012

SECURITY IN MYSQL


Hello the IT knowledge (science) lovers.. you are on my blog at “We Are Knowledge”.. In here you will getting many IT knowledge from IT knowledge based desktop programming until web programming. You can take it FREE.. so you mustre ad my article in order to getting this IT knowledge..


Now, I want giving you tutorial about “MYSQL” and discuss about “SECURITY IN MYSQL”. You will know previous ?? or you will know that ?? let’s do read this article. Have fun friends to read ..


Security in the program that we make is very necessary, because if we make the program we have or do not have security, then we will easily enter the program by others without our knowledge, and take that information can even damage the contents of the program or that program.


The following tips - tips from me in order to maintain security on your MYSQL.

1. Try not to let you not provide access to all users (such as update, insert, delete) except for the root user. because if you let them know that access, then others can freely enter your data (MYSQL)


2. You must understand the command or query MYSQL, namely: GRANT and REVOKE. This query is used to set permissions on your MYSQL.


3. If you make the MYSQL password, do not use plain text form, try using PASSWORD () or MD5, because if you use this content you will not know the password.


4. In making your password should combine letters and numbers, because then your password is difficult to know other people, but you have to remember if the tone forget, your data will not be open again


5. Use a firewall to prevent intrusion, because with this, it can reduce the percentage of intrusion by strangers


6. And my last point is, be - careful with the internet, because if you use this tool to transfer the data, your data can be known by the hijackers.



Ok.. just it…
Ihope you understand…
See you laters..

Monday, September 24, 2012

TRANSACTION IN MYSQL


Hi.. IT knowledge lovers.. you are on my blog at “We Are Knowledge”.. in here you will take many IT knowledge from desktop programming until web programming. You can take it FREE. So you must to read this article if you will it..

Likely this article to fill IT knowledge because, in this article discuss about “MYSQL”and tutorial about “Transaction in MYSQL”..you will know that ?? let’s do read… have fun friends to read !!

This is tutorial :

1. Transaction
    A. Lock Table          
    B. BEGIN
    C. COMMIT
    D. ROLLBACK

Ok.. we are start!!


1. TRANSACTION

MYSQL programming languages constitutes one of software which get client's basis server. Intention dariclient serve is, on client can do DDL'S operation or DML as, insert, delete, update.

On MYSQL exists 4 (four) transactions basic principle, which is :

1. Atomicity

>> Constituting component most adari's little material.


2. Consistency

>> Intention of this transactions principle is if anything bust on one transactions, don't regard the other transactions.


3. Isolation

>> This transactions principle is, if a data was utilized at one particular transactions, that data can't be utilized until that data finish is utilized on that transactions.


4. Durability

>> Following transactions principle is if one transactions be finished dieksekusi, its result can'te degan well


A. LOCK TABLE

Function from query it is subject to be draw the line purpose access right a table.

Common form :

LOCK TABLE table1 locktype, table2 locktype, table3 locktype,…;


This is option for “locktype”


A. READ

>> Read means all user can open to read table content, but user can't revamp table content as insert, delete, update.


B. READ LOCAL

>>
This instruction is well-nigh as as instruction' READ' but on this instruction, just gets to do process "insert" and can't do process "delete and is update".


C.WRITE

>> This instruction as insert, update, delete just gets to be done on user that active.

D. LOW PRIORITY WRITE

>> This instruction as instruction' WRITE" but user is active can do affix instruction which is' READ LOCK'.


B. BEGIN

To do startup or first time instruction in transaction processing


C. COMMIT

To do working out or instruction the last time in transaction processing. Its utilised for that data that is revamped becomes point that independent mean it can't at back fox


D. ROLLBACK

Utilize following instruction if you wants to do "undo". since this instruction gets to back startup point, just just if you have done instruction "commit" therefore instruction "rollback" are not functioning



Ok.. just it…
I hope you understand…
See you later