How to search table name with MySQL
Published on| December 3rd, 2009 | No Comment.
You may want to know table name in DataBase with MySQL.
If you want to do it, you should input the following command (SHOW TABLES command).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | > mysql -h=xxx -u=username -p=**** dbname Welcome to the MySQL monitor. Commands end with ; or g. Your MySQL connection id is 290 Server version: 5.1.36-community MySQL Community Server (GPL) Type 'help;' or 'h' for help. Type 'c' to clear the current input statement. mysql> SHOW TABLES like 'wp_%'; +-----------------------+ | Tables_in_bgcom (wp_%)| +-----------------------+ | wp2_blog_off_comments | | wp2_blog_off_links | | wp2_blog_off_options | | wp2_blog_off_postmeta | | wp2_blog_off_posts | | wp2_blog_off_term_relationships | | wp2_blog_off_term_taxonomy | | wp2_blog_off_terms | | wp2_blog_off_usermeta | | wp2_blog_off_users | +-----------------------+ 13 rows in set (0.01 sec) mysql> |
Line 1 is the login command. -h = xxx-u = username-p =**** dbname
xxx: mysql host name
username: username to login
****: password to login
dbname: database name to use
username: username to login
****: password to login
dbname: database name to use
On Line 9, the table name with the character string of 'wp_' at the head is searched, and displayed.
You might also like:
Trackback URL
After Admin approves this comment, it will be shown.
Comments
Leave a Reply

