ubuntu system mysql environment construction and mysql data type introduction

1. Server installation (ubuntu system)

sudo apt-get install mysql-server

Server start

sudo service mysql start

Check whether the server is turned on

ps -ajx|grep mysql

Remarks: ps view all processes in the current system, -a displays all user processes, -j displays processes in task format, -x displays processes without terminal control, | pipeline

Server shutdown

sudo service mysql stop

2. Client installation (ubuntu system)

sudo apt-get install mysql-client

Server start

 

Post here the cracking tutorial of  Navicat Premium 15

https://www.jianshu.com/p/aca31d8f4c5b

3. The data type of mysql

(1) Integer type (the second line of each type indicates the value range of unsigned integer type)

(2) Floating point type

(3) String type

(4) text type

(5) Principles for selecting string types

(6) Enumeration type

(7) Time type

4. mysql login and exit

(1) Login

mysql -uroot -p

(2) Exit

         exit    quit 

5. Display the database version

     

select version();

6. Display time

select now();

 

Guess you like

Origin blog.csdn.net/qq_39197555/article/details/113813262