MySQL & view > mysql 视图



MySQL & view

MySql 视图

mysql 视图

MySql 视图修改

MySql视图view的使用:创建、修改、删除 - IT笔录

​https://itbilu.com/database/mysql/E1q5C22_.html#update​

注:用 AS 来重命名原始列名

​https://www.jb51.net/article/36363.htm​



SQL & MySQL

MySQL & view_视图

​http://www.runoob.com/sql/sql-tutorial.html​

​http://www.runoob.com/mysql/mysql-tutorial.html​

# admin

$ net start mysql

$ mysql --help

# login
$ mysql -u root -p pwd123456

# login
$ mysql -u root -p
# pwd123456

# login
$ mysql -u -p
# root
# pwd123456



MySQL & view_SQL_02

MySQL & view_SQL_03

solution

???

​https://dev.mysql.com/doc/refman/5.7/en/resetting-permissions.html​

​https://dev.mysql.com/doc/refman/5.7/en/password-security-user.html​


# help
$ mysql --help
$ mysql -?
$ mysql -I

# version
$ mysql ---version
$ mysql -V
# mysql Ver 14.14 Distrib 5.7.22, for Win64 (x86_64)




MySQL & view_view_04

not work ???

$ mysql -?


Default options are read from the following files in the given order:

C:\WINDOWS\my.ini

C:\WINDOWS\my.cnf

C:\my.ini

C:\my.cnf

H:\MySQL\mysql-5.7.22-winx64\my.ini

H:\MySQL\mysql-5.7.22-winx64\my.cnf


$ mysql --defaults-extra-file=H:/MySQL/mysql-5.7.22-winx64/my.cnf



my.cnf


[client]
user = root
password = pwd123456
host = localhost


my.ini


[mysql]
# 设置mysql客户端默认字符集
default-character-set=utf8

[mysqld]
# 设置3306端口
port = 3306
# 设置mysql的安装目录
basedir=H:\MySQL\mysql57
# 设置mysql数据库的数据的存放目录
datadir=H:\MySQL\sqldata
# 允许最大连接数
max_connections=20
# 服务端使用的字符集默认为8比特编码的latin1字符集
character-set-server=utf8
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB



OK

MySQL & view_MySQL_05

MySQL & view_database_06

MySQL & view_SQL_07

MySQL & view_SQL_08

# admin
$ net start mysql

# mysql --user=your-user-name --password=your-password
$ mysql -uroot -p
# password
$ ******


$mysql> show databases;

$mysql> use test;

$mysql> show tables;


$mysql> select * from user;

# beautiful & format

$mysql> select * from user \G;


​http://dev.mysql.com/doc/refman/5.7/en/select.html​


xgqfrms