MYSQL

To list database type the following command

mysql> show databases;
Output:

+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
+--------------------+
2 rows in set (0.00 sec)

information_schema and mysql are name of databases. To use these database and to list available tables type the following two commands:
mysql> use mysql;

Output:

Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed

Now list tables:
mysql> show tables;

Output:

+---------------------------+
| Tables_in_mysql |
+---------------------------+
| columns_priv |
| db |
| func |
| help_category |
| help_keyword |
| help_relation |
| help_topic |
| host |
| proc |
| procs_priv |
| tables_priv |
| time_zone |
| time_zone_leap_second |
| time_zone_name |
| time_zone_transition |
| time_zone_transition_type |
| user |
+---------------------------+
17 rows in set (0.00 sec)
หลายท่านคงประสบปัญหาในการใช้งานโปรแกรม ประเภทเครื่องมือเช่น Mysql Administrator
Navicat ทำการ connect เข้าไปหา Database แล้ว Mysql Server ไม่ยอมให้ติดต่อด้วย

หากเราต้องการที่จะติดต่อได้ เราต้องแก้ไข config ของ Mysql ก่อน ให้ทำการแก้ไขที่ ไฟล์ my.cnf

เดิม
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address = 127.0.0.1
#
แก้ไขเป็น
# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
#bind-address = 127.0.0.1 <------ เราต้อง ใส่เครื่องหมาย # ที่นี่ครับ

แล้วสั่งrestart ใหม่ เท่านี้ก็สามารถใช้งานได้
อย่างลืมกำหนดสิทธผู้ใช้ให้สามารถใช้ได้มากกว่า localhost ด้วยนะ เดี๋ยวจะหาว่าไม่บอกกัน
แตกไฟล์ออก แล้ว ทำการ copy file cp config.sample.inc.php config.inc.php
ก็จะสามารถใช้งานได้แล้ว แต่ต้องกำหนด user ใน mysql ก่อนนะครับ หรือใช้ root
ก็ได้