xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

MySQL & view

MySQL & view

MySql 视图

mysql 视图

https://www.cnblogs.com/chenpi/p/5133648.html

MySql 视图修改

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

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

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

https://blog.csdn.net/pythonkiddz/article/details/55059162
https://blog.csdn.net/moxigandashu/article/details/63254901

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


SQL & MySQL

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


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)



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

# 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

posted @ 2018-11-28 16:29  xgqfrms  阅读(166)  评论(12编辑  收藏  举报