'''MySQL'''
mysql -u root -h localhost -p < import.sql
Shutdown local: go to mysql bin directory then:
mysqladmin -u root -p shutdown
To generate create table code, you could run a mysqldump on the database, which generates code to create all of the tables in the database (and load all of the data).
You could also execute the single SQL command:
show create table <tablename>;
Using mysqladmin:
mysqladmin -u root -p status
Using ps:
ps aux ¦ grep mysql
The MySQL Socket file "mysql.sock" can be used to communicate with the server, as opposed to using TCPIP. Often the MySQL socket file is located '/var/lib/mysql/mysql.sock' or '/tmp/mysql.sock', although this may vary from one installation to another.