how do you see the table columns in mysql?

mqh7
New Contributor II

A user on this site named donmontalvo turned me onto this way to access the MySQL DB.

$ mysql -u jamfsoftware -p
Enter password: Welcome to the MySQL monitor. Commands end with ; or g.
Your MySQL connection id is 11478
Server version: 5.0.92-log Source distribution

Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema | | jamfsoftware | | test | +--------------------+
3 rows in set (0.00 sec)

mysql> use jamfsoftware;
Database changed
mysql> show tables;

My next question is how do I view the columns in a table?

2 ACCEPTED SOLUTIONS

donmontalvo
Esteemed Contributor III

Sonic84
Contributor III

Doing a table dump in terminal can be daunting. Especially if you are keeping track of Unix binaries or usage logs. I keep a copy of phpMyAdmin on my dev box for looking through the tables via a web browser. You can execute queries or mysql operations via the GUI and have the mysql terminal syntax displayed for the command you just ran. This makes getting the proper mySQL syntax for complex terminal commands much easier.

http://www.phpmyadmin.net/home_page/index.php

View solution in original post

4 REPLIES 4

donmontalvo
Esteemed Contributor III

http://bit.ly/TbHyD0

:-)

--
https://donmontalvo.com

Sonic84
Contributor III

Doing a table dump in terminal can be daunting. Especially if you are keeping track of Unix binaries or usage logs. I keep a copy of phpMyAdmin on my dev box for looking through the tables via a web browser. You can execute queries or mysql operations via the GUI and have the mysql terminal syntax displayed for the command you just ran. This makes getting the proper mySQL syntax for complex terminal commands much easier.

http://www.phpmyadmin.net/home_page/index.php

Lotusshaney
Contributor II

I use the Sequel Pro app to look at the Database

Check it out here

http://www.sequelpro.com

jarednichols
Honored Contributor