MySQL


'''MySQL'''
mysql -u root -h localhost -p < import.sql

Shutdown local: go to mysql bin directory then:

mysqladmin -u root -p shutdown

How to get CREATE TABLE code?

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>;

How to see if mysql is running

Using mysqladmin:

mysqladmin -u root -p status

Using ps:

ps aux ¦ grep mysql

MySQL Socket File: mysql.sock

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.     

Navicat

Navicat makes commercial database management tools for MySQL. For more information, see http://navicat.com.

Passwords

To set a root password when the root password is currently blank: mysqladmin -u root password <newpassword> To change passwords in general: 1. Login to the mysql command line interface with the user's current password: mysql -u <username> -p 2. At the "mysql>" prompt, type: set password = password("newpassword");

phpMyAdmin