SELECT selection_fields FROM data_source WHERE selection_criteria_is_met;
USE mysql;
Database changed
SHOW TABLES;
+---------------------------+ | Tables_in_mysql | +---------------------------+ | columns_priv | | db | | event | | func | | general_log | | help_category | | help_keyword | | help_relation | | help_topic | | host | . . . . . .
SHOW COLUMNS FROM user;
+------------------------+-----------------------------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +------------------------+-----------------------------------+------+-----+---------+-------+ | Host | char(60) | NO | PRI | | | | User | char(16) | NO | PRI | | | | Password | char(41) | NO | | | | | Select_priv | enum('N','Y') | NO | | N | | . . . . . .
SELECT user,password,host FROM user;
+------------------+-------------------------------------------+-----------+ | user | password | host | +------------------+-------------------------------------------+-----------+ | root | *DE06E242B88EFB1FE4B5083587C260BACB2A6158 | localhost | | root | *DE06E242B88EFB1FE4B5083587C260BACB2A6158 | 127.0.0.1 | | root | *DE06E242B88EFB1FE4B5083587C260BACB2A6158 | ::1 | | debian-sys-maint | *9AE1BDEEBCD7F85D6304C3FB18146904CE3496F6 | localhost | +------------------+-------------------------------------------+-----------+ 4 rows in set (0.00 sec)
SELECT * FROM user;
SELECT user,password,host FROM user WHERE user = "debian-sys-maint";
+------------------+-------------------------------------------+-----------+ | user | password | host | +------------------+-------------------------------------------+-----------+ | debian-sys-maint | *9AE1BDEEBCD7F85D6304C3FB18146904CE3496F6 | localhost | +------------------+-------------------------------------------+-----------+ 1 row in set (0.00 sec)
SELECT user,password,host FROM user WHERE host = "localhost";
+------------------+-------------------------------------------+-----------+ | user | password | host | +------------------+-------------------------------------------+-----------+ | debian-sys-maint | *9AE1BDEEBCD7F85D6304C3FB18146904CE3496F6 | localhost | | root | *DE06E242B88EFB1FE4B5083587C260BACB2A6158 | localhost | +------------------+-------------------------------------------+-----------+ 2 rows in set (0.00 sec)
SELECT user,password,host FROM user WHERE host = "localhost" AND user = "root";
+------+-------------------------------------------+-----------+ | user | password | host | +------+-------------------------------------------+-----------+ | root | *DE06E242B88EFB1FE4B5083587C260BACB2A6158 | localhost | +------+-------------------------------------------+-----------+ 1 row in set (0.00 sec)
SELECT user,password,host FROM user WHERE user LIKE "d%";
+------------------+-------------------------------------------+-----------+ | user | password | host | +------------------+-------------------------------------------+-----------+ | debian-sys-maint | *9AE1BDEEBCD7F85D6304C3FB18146904CE3496F6 | localhost | +------------------+-------------------------------------------+-----------+ 1 row in set (0.00 sec)
SELECT user,password,host FROM user WHERE user LIKE "d%" OR user LIKE "r%";
+------------------+-------------------------------------------+-----------+ | user | password | host | +------------------+-------------------------------------------+-----------+ | root | *DE06E242B88EFB1FE4B5083587C260BACB2A6158 | localhost | | root | *DE06E242B88EFB1FE4B5083587C260BACB2A6158 | 127.0.0.1 | | root | *DE06E242B88EFB1FE4B5083587C260BACB2A6158 | ::1 | | debian-sys-maint | *9AE1BDEEBCD7F85D6304C3FB18146904CE3496F6 | localhost | +------------------+-------------------------------------------+-----------+ 4 rows in set (0.00 sec)
Article ID: 244
Created On: Thu, Jan 2, 2014 at 3:01 AM
Last Updated On: Thu, Jan 2, 2014 at 3:01 AM
Authored by: ASPHostServer Administrator [asphostserver@gmail.com]
Online URL: http://faq.asphosthelpdesk.com/article.php?id=244