MySQL

From DUNE
Jump to: navigation, search

Install

sudo apt-get update
sudo apt-get install mysql-server

The Service

systemctl status mysql.service
mysqladmin -p -u root version
mysql -u root -p

CLI Client Commands

Misc

quit
\q
SELECT VERSION();
select (4+11);

Admin

SHOW DATABASES;
use FOO;
create table t1 (name varchar(20), ts DATE);
describe t1;