[gmontee@localhost ~]$ mysql -u root tmp
|
Reading table information for completion of table and column names
|
You can turn off this feature to get a quicker startup with -A
|
|
Welcome to the MariaDB monitor. Commands end with ; or \g.
|
Your MariaDB connection id is 16
|
Server version: 10.0.15-MariaDB-log MariaDB Server
|
|
Copyright (c) 2000, 2014, Oracle, SkySQL Ab and others.
|
|
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
|
|
MariaDB [tmp]> SHOW CREATE TABLE datetime_table;
|
+----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
| Table | Create Table |
|
+----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
| datetime_table | CREATE TABLE `datetime_table` (
|
`id` int(10) NOT NULL,
|
`modifiedon` datetime DEFAULT NULL
|
) ENGINE=CONNECT DEFAULT CHARSET=latin1 CONNECTION='DSN=connect_test_azure;UID=connect_test;PWD=Password1' `TABLE_TYPE`='ODBC' `TABNAME`='dbo.datetime_table' |
|
+----------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
1 row in set (0.00 sec)
|
|
MariaDB [tmp]> DROP USER 'connecttest'@'localhost';
|
Query OK, 0 rows affected (0.00 sec)
|
|
MariaDB [tmp]> CREATE OR REPLACE
|
-> DEFINER = CURRENT_USER
|
-> SQL SECURITY DEFINER
|
-> VIEW datetime_view
|
-> AS SELECT * FROM datetime_table;
|
Query OK, 0 rows affected (0.00 sec)
|
|
MariaDB [tmp]> CREATE USER 'connecttest'@'localhost';
|
Query OK, 0 rows affected (0.00 sec)
|
|
MariaDB [tmp]> GRANT SELECT ON datetime_view TO 'connecttest'@'localhost';
|
Query OK, 0 rows affected (0.00 sec)
|
|
MariaDB [tmp]> \q
|
Bye
|