Check whether MySQL is installed on Linux:
$ sudo service MySQL start
Ubuntu Linux installation configuration mysql:
$ sudo apt-get install Mysql-server
$ sudo apt-get install mysql-client
After the installation is complete, use the command to verify that the installation was successful:
$ sudo netstat-tap | grep MySQL
To modify the MySQL configuration file:
$ sudo gedit/etc/mysql/my.cnf
Open MySQL and log in with root:
$ sudo service MySQL start
$ mysql-u Root
To view the database:
$ show databases;
Choose to connect to a database:
$ use db_name
View table:
$ show Tables;
Exit MySQL:
$ quit
$ exit
===================================================
New database:
$ CREATE DATABASE db_name;
New data table:
$ CREATE TABLE T_name
(col_name data_type (length),
......
);
Insert data:
$ INSERT into T_name (col_name,col_name) VALUES (V1,V2);
Simple SQL and MySQL operation on Linux