1, source package installation MySQL directly into not go, need to do environment variables, in the/etc/profile file add Path=/usr/local/mysql/bin: $PATH
Export path two lines of command, using Surce/etc/profile reload environment variables, if you do not understand please see the article source installation MySQL.
2, access to the database command: the first access to the data by default no password, direct MySQL directly into the database is the most important core, usually using the password, the first command to set the password is: mysqldump-uroot-password password, The command to enter the database is: Msyql-uroot-p Enter the password can be
3. The command of the new database is: Create database name; View the database command that already exists in the database: show databases; the command to enter a database is the use database name; the command to view tables that already exist in the database is: show tables The command to view the table structure is: DESC table name; View a table's contents as: SELECT * from table name where condition; If you view everything inside the table, do not add a where condition.
4: The command to delete the database is: drop database name; NOTE!!! Delete with truncate deletes the table data and does not delete the table, and the drop table structure is deleted
Don't like to spray!!!!!!!!!!!
MySQL Common commands