Pages

Friday, July 15, 2011

MySQL scripts

shell> mysql -h host -u user -p
Enter password: ********
 mysql -u root -p
Enter password: ********


show databases;

shell> use [database];
use lportal

show tables;

shell> describe [tablename];
describe website
select DATABASE();     //current databse

mysql> SELECT USER(),VERSION(), CURRENT_DATE;

No comments:

Post a Comment