nick@Vaxis:~$ ssh artemis Linux artemis 4.19.0-18-amd64 #1 SMP Debian 4.19.208-1 (2021-09-29) x86_64 The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. Last login: Wed Mar 1 12:54:02 2023 from 136.168.34.62 nick@artemis:~$ clear nick@artemis:~$ mysql ERROR 1045 (28000): Access denied for user 'nick'@'localhost' (using password: NO) BBnick@artemis:~$ mysql -p Enter password: BWelcome to the MariaDB monitor. Commands end with ; or \g. BBYour MariaDB connection id is 17298 Server version: 10.3.36-MariaDB-0+deb10u2 Debian 10 BBCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. BBType 'help;' or '\h' for help. Type '\c' to clear the current input statement. BMariaDB [(none)]> show databases; +---------------------+ | Database | +---------------------+ | 3420_timeslots | | aalmanza | | aamistoso | | aarcosavalos | | aattiaibrahi | | abotello | | acardenassil | | acazares | | adiazperez | | aesa | | ailarde | | amanz | | amartinez | | amilin | | anicholas | | apacheco | | aparriott | | apea | | aportillo | | atorres | | autosource | | avu | | azacariasvil | | bayapantecat | | bbowers | | benco | | bibliotech | | bjones | | blockbuster2 | | bobabuddy | | booksbooksbooks | | bookworm | | bparsons | | btate | | buddydj | | cart_pushers | | cestes | | cgallegos | | chatroom | | chernandez | | cmartinez | | cnavarro | | cokpara | | company | | ctennison | | danzaldo | | dbalderas | | dcasas | | dcerrato | | deejayscafe | | dfanucchi | | dgonzalez | | dgonzalez2 | | division | | djosep | | dlopez | | dmacias | | dmesa | | dontpanic | | dpham | | drivera | | dsimpson | | dtorres | | dware | | dwelch | | earroyo | | ecastaneda | | eescutiaeche | | efelicidario | | egamino | | ehsan_demo | | ekyles | | eldenbees | | emckenna | | employees | | eosornio | | eposting | | eramossorian | | erosales | | esnopko | | etagaca | | etapiaramire | | ewarren | | financingfordummies | | flightclub | | flin | | furniture_store | | furryfriendfinder | | gcaragchiu | | gititfresh | | gjimenez | | gjimenezroja | | grading_lab6 | | gtorres | | guilddb | | gymtraffic | | gzepeda | | hallen | | hardwaremerchants | | hayleeco | | hbal | | hcheema | | hellodb | | hmartinez | | hmmc | | honestcollective | | hotelbookingsystem | | hpascual | | ichavez | | imacias | | inerizavala | | inform_a_fish | | information_schema | | ingredients_proj | | iruiz | | jambriz | | jarenas | | jarzate | | jbankston | | jcox | | jflanders | | jflores | | jguarcasgarc | | jhicks | | jjellie | | jkuo | | jmiranda | | jnukpese | | jparks | | jpereyra | | jquinonez | | jrodriguez | | jrojas | | jsierradiaz | | jsoto | | jtagaca | | julloa | | kcarrillo | | kcoggshall | | klappin | | ksantiago | | lab6 | | laguilar | | ldiaz | | learnapp | | lgamboa | | librarymanpreet | | lmoreno | | lost+found | | lost_items | | lostchapter | | luxuryautomotives | | macosta | | mail_verify | | mangeles | | mbuenonunez | | mcha | | mdeguia | | mealdb | | mervin | | mestrada | | metchison | | mfuentesrive | | mgutierrez | | mjimenez | | mlara | | mlara2 | | moviedb | | msaini | | mschmidt | | msteiner | | mtaylor | | mvargas | | mwisehart | | myhealthypet | | mysql | | nanocenter | | nanocenter2 | | nanocenterv2 | | nchiang | | nflessati | | nick | | nleyvarodrig | | npitts | | nromasanta | | ocastillo | | paypool | | pcruz | | performance_schema | | plantpage | | ppark | | prodriguez | | pzavala | | quizdemo | | ramrod | | rateem | | rateem2 | | rcorona | | readymedi | | restaurant | | rgordon | | rgrewal | | rmanzo | | rmojica | | rocket_power | | rpatel | | rplascencia | | runnerpp | | rvelasquez | | rwyatt | | sabdulrazzak | | scarlos | | sdenney | | sercoli | | sesquivel | | sflores | | sjue | | skaing | | skurtz | | sledwell | | sleep_tracker | | smayfieldsmi | | smclaughlin | | snez | | sparksocial | | srasapatirat | | ssingh | | stay_fresh | | steve | | subscriptions | | svargas | | teamo7 | | thooser | | thriftstore | | timesheet | | tradespace | | ufcdb | | unreliablenarrator | | useraccountsdemo | | usingh | | xreyes | | ybond | | zgarcia | +---------------------+ B243 rows in set (0.002 sec) BB BMariaDB [(none)]> use nick; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A BDatabase changed BMariaDB [nick]> show tables; +----------------------+ | Tables_in_nick | +----------------------+ | Book | | Guest | | Hotel | | Room | | Users | | a | | badfriendships | | f | | friendship | | lab5 | | lab5_responsehistory | | lab5_responses | | lab5_subset | | password | | person | | person_emails | | product | | t1 | | test | +----------------------+ B19 rows in set (0.000 sec) BB BMariaDB [nick]> set password for nick2localhost = PASSWORD('your'new'password'); ERROR 1133 (28000): Can't find any matching row in the user table BBMariaDB [nick]> set password fo3420_demoocalhost = PASSWORD('your new password'); ERROR 1133 (28000): Can't find any matching row in the user table BBMariaDB [nick]> create user 3420_demo@localhost; BQuery OK, 0 rows affected (0.002 sec) BB setrpasswordcfor 3420_demo@localhostm=@PASSWORD('your new password'); BQuery OK, 0 rows affected (0.000 sec) BB BMariaDB [nick]> exit BBye Bnick@artemis:~$ mysql -p -u 3420_demo Enter password: BWelcome to the MariaDB monitor. Commands end with ; or \g. BBYour MariaDB connection id is 17371 Server version: 10.3.36-MariaDB-0+deb10u2 Debian 10 BBCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. BBType 'help;' or '\h' for help. Type '\c' to clear the current input statement. BMariaDB [(none)]> show databases; +--------------------+ | Database | +--------------------+ | information_schema | +--------------------+ B1 row in set (0.004 sec) BB BMariaDB [(none)]> exit BBye Bnick@artemis:~$ vimq.my.cnf 3420_demo ".my.cnf"1[New]t3L,950C/written Ahs3/2TByte:aBhe4/3 Byte: Chr5/4 Byte: Dhn6/5 Byte: Eha7/6 Byte: FhmLine: 2 Column: 8/7 Byte: 10he9/8 1h8/7 0h Line: 2 Column: ~ 7/6 Byte: Fh6/5 Byte: Eh5/4 Byte: Dh=6/5 Byte: Eh-7/6 Byte: Fh6/5 Byte: Eh37/6 Byte: Fh4Line: 2 Column: 8/7 Byte: 10h29/8 1h010/9 2h_11/10 3hd2/11 4he3/12 5hm4/13 6ho5/14 7h3 1/0 8hp2/1 9ha3/2 Ahs4/3 Bhs5/4 Chw6/5 Dho7/6 Ehr8/7 Fhd9/8 Byte: 20h=10/9 1hyour new password27/26 Byte: 32h Line: 2 Column: 15/14 Byte: 17h 66%4/6h3/5h2/4h1/3h0/2h 9/1h8/0h Line: 2 Column: 7/14 Byte: Fh6/EhLine: 3 Column: 6/26 Byte: 1Dh 100%7/Eh8/Fh9/20h10/1h1/2h2/3h3/4h4/5h5/6h6/7h7/8h8/9h9/Ah20/Bh1/Ch2/Dh3/Eh4/Fh5/30h6/1h7/2h^[ 6/1h::x ~ ~ ~ ~ [1] Toothmang ~/.my.cnf Type= Line: 0 Column: 0-1/0 Byte: 0h 100%i -- INSERT -- 1[[+]1 2/1 Byte: 2hm3/2 Byte: 3hy4/3 Byte: 4hs5/4 Byte: 5hq6/5 Byte: 6hl7/6 Byte: 7h]1-8/7 Byte: 1h[mysql] 88h Adios, Cowboy nick@artemis:~$ chmod 600 .my.cnf nick@artemis:~$ mysql BWelcome to the MariaDB monitor. Commands end with ; or \g. BBYour MariaDB connection id is 17390 Server version: 10.3.36-MariaDB-0+deb10u2 Debian 10 BBCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. BBType 'help;' or '\h' for help. Type '\c' to clear the current input statement. BMariaDB [(none)]> show databases; +--------------------+ | Database | +--------------------+ | information_schema | +--------------------+ B1 row in set (0.004 sec) BB BMariaDB [(none)]> exit BBye Bnick@artemis:~$ vim .my.cnf ".my.cnf" 3L, 50C▽ cWelcome back, Toothmang[mysql] user=3420_demo password=your new password Adios, Cowboy ~ ~ ~ ~ ~ ~ ~ [1] Toothmang ~/.my.cnf Type= Line: 3 Column: 1/26 Byte: 18h 100%~@k $ 26/31ha -- INSERT --7/2h[+]4 1/0 3hd2/1 4ha3/2 5ht4/3 6ha5/4 7hb6/5 8ha7/6 9hs8/7 Ahe9/8 Bh=10/9 Chu11/10 Dh 10/9 Ch311/10 Dh42/11 Eh23/12 Fh04/13 Byte: 40h_5/14 1hd6/15 2he7/16 3hm8/17 4ho9/18 5h^[ 8/4h^[ ^[ ::q! nick@artemis:~$ mv .old.my.cnf .my.cnf nick@artemis:~$ mysql Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A BWelcome to the MariaDB monitor. Commands end with ; or \g. BBYour MariaDB connection id is 17410 Server version: 10.3.36-MariaDB-0+deb10u2 Debian 10 BBCopyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. BBType 'help;' or '\h' for help. Type '\c' to clear the current input statement. BMariaDB [nick]> create table examplee -> ( -> col1 int, -> col2 int default 0, -> ); BQuery OK, 0 rows affected (0.005 sec) BB BMariaDB [nick]> insert into example values (1, 1); BQuery OK, 1 row affected (0.001 sec) BB BMariaDB [nick]> select * from example; +------+------+ | col1 | col2 | +------+------+ | 1 | 1 | +------+------+ B1 row in set (0.000 sec) BB insertDintoiexamplelvaluesf(1);;;;mple; ERROR 1136 (21S01): Column count doesn't match value count at row 1 BBMariaDB [nick]> insert into example(col1)s (1); BQuery OK, 1 row affected (0.001 sec) BB selectD*nfromxexample;luest(1,x1);le (col1) values (1); +------+------+ | col1 | col2 | +------+------+ | 1 | 1 | | 1 | 0 | +------+------+ B2 rows in set (0.000 sec) BB insertDintoiexamplel(col2)fvaluesa(1);; BQuery OK, 1 row affected (0.001 sec) BB selectD* fromkexample;t into example (col2) values (1); +------+------+ | col1 | col2 | +------+------+ | 1 | 1 | | 1 | 0 | | NULL | 1 | +------+------+ B3 rows in set (0.000 sec) BB insertDintoiexamplel(col2)fvaluesa(1);; BQuery OK, 1 row affected (0.001 sec) BB BMariaDB [nick]> insert into example (col2) values (1); BQuery OK, 1 row affected (0.001 sec) BB BMariaDB [nick]> insert into example (col2) values (1); BQuery OK, 1 row affected (0.001 sec) BB selectD*nfromxexample;ol2)tvaluesp(1);col2) values (1); +------+------+ | col1 | col2 | +------+------+ | 1 | 1 | | 1 | 0 | | NULL | 1 | | NULL | 1 | | NULL | 1 | | NULL | 1 | +------+------+ B6 rows in set (0.000 sec) BB BMariaDB [nick]> select * from example; +------+------+ | col1 | col2 | +------+------+ | 1 | 1 | | 1 | 0 | | NULL | 1 | | NULL | 1 | | NULL | 1 | | NULL | 1 | +------+------+ B6 rows in set (0.000 sec) BB BMariaDB [nick]> select * from example;where col1 is not null; +------+------+ | col1 | col2 | +------+------+ | 1 | 1 | | 1 | 0 | +------+------+ B2 rows in set (0.000 sec) BB BMariaDB [nick]> select * from example where col1 !=nnull;;;;; BEmpty set (0.000 sec) BB BMariaDB [nick]> select * from example where col1 != null; BEmpty set (0.000 sec) BB BMariaDB [nick]> select null = null; +-------------+ | null = null | +-------------+ | NULL | +-------------+ B1 row in set (0.000 sec) BB BMariaDB [nick]> select *ufrom examisenote!e col1 +------+------+ | col1 | col2 | +------+------+ | 1 | 1 | | 1 | 0 | +------+------+ B2 rows in set (0.000 sec) BB BMariaDB [nick]> select null is null; +--------------+ | null is null | +--------------+ | 1 | +--------------+ B1 row in set (0.000 sec) BB BMariaDB [nick]> select null is otnnull; +------------------+ | null is not null | +------------------+ | 0 | +------------------+ B1 row in set (0.000 sec) BB *ufromDexample]whereecol1uisonotxamplelwhere col1 is not +------+------+ | col1 | col2 | +------+------+ | 1 | 1 | | 1 | 0 | +------+------+ B2 rows in set (0.000 sec) BB BMariaDB [nick]> select * from example where col1 is not null;and col2 > 0; +------+------+ | col1 | col2 | +------+------+ | 1 | 1 | +------+------+ B1 row in set (0.000 sec) BB BMariaDB [nick]> selectcol1rom example where col1 is not null and col2 > 0; +------+ | col1 | +------+ | 1 | +------+ B1 row in set (0.000 sec) BB 2MariaDB [nick]> select col1 from example where col1 is not null and col2 > 0; +------+ | col2 | +------+ | 1 | +------+ B1 row in set (0.000 sec) BB BMariaDB [nick]> select col2,col1 example where col1 is not null and col2 > 0; +------+------+ | col2 | col1 | +------+------+ | 1 | 1 | +------+------+ B1 row in set (0.000 sec) BB BMariaDB [nick]> select * frompexample' '> '; ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' '' at line 1 BBMariaDB [nick]> select * from example' ;; +------+------+ | col1 | col2 | +------+------+ | 1 | 1 | | 1 | 0 | | NULL | 1 | | NULL | 1 | | NULL | 1 | | NULL | 1 | +------+------+ B6 rows in set (0.000 sec) BB BMariaDB [nick]> select col2om example; +------+ | col2 | +------+ | 1 | | 0 | | 1 | | 1 | | 1 | | 1 | +------+ B6 rows in set (0.000 sec) BB BMariaDB [nick]> selectdistintrom example; +------+ | col2 | +------+ | 1 | | 0 | +------+ B2 rows in set (0.001 sec) BB BMariaDB [nick]> [1]+ Stopped mysql nick@artemis:~$ fg mysql MariaDB [nick]> [1]+ Stopped mysql nick@artemis:~$ vim example.sql create7/6sByte:N7h8/7lByte:c8ht9/8eByte:,9ha10/9aByte: Ahb11/10 Byte: Bhl2/11 Bytetable3/12 Byte: Dh4/13 Byte: Ehe5/14 Byte: FhxLine: 1 Column: 16/15 Byte: 10ha7/16 1hm8/17 2hp9/18 3hl20/19 4he1/20 5h2/21 6h1/20 5h2 1/06h(2/1 7h ~ ~ ~ ~ ~ ~ ~ ~ [1] Toothmang ~/example.sql Type=SQL Line: 0 Column: 0-1/0 Byte: 0h 100%i -- INSERT -- 1c[+]1 2/1 Byte: 2hr3/2 Byte: 3he4/3 Byte: 4ha5/4 Byte: 5ht6/5 Byte: 6h 3 3/2 Ah) Line: 2 Column: 1-4/1 Byte: 16h 66% );Line: 3 Column: 3/2 Byte: 1Ah 100%( ) Line: 2 Column: 2/1 Byte: 17h 66% )( 3 3/2 Ah 75%5/4 Ch3/2 Ahc4/3 Bho5/4 Chl6/5 Dh17/6 Eh8/7 Fhi9/8 Byte: 20in10/9 int11/10 2h2/11 3hp3/12 4hr4/13 5hi5/14 6hm6/15 7ha7/16 8hr8/17 9hy9/18 Ah20/19 Bhk1/20 Che2/21 Dhy3/22 Eh,4/23 Fh4 3/2 Byte: 32h 80%c4/3 3ho5/4 4hl6/5 5h27/6 6h8/7 7hi9/8 8in10/9 int11/10 Ah2/11 Bhd3/12 Che4/13 Dhf5/14 Ehu6/15 Fha7/16 Byte: 40h6/15 Byte: 3Fh5/14 Eha6/15 Fhu7/16 Byte: 40hl8default9/18 2h20/19 3h01/20 4h,2/21 5h5 3/2 8h 83%c4/3 9ho5/4 Ahl6/5 Bh37/6 Ch8/7 Dhv9/8 Eha10/9 Fhr11/10 Byte: 50hc2/11 1hh3/12 2ha4varchar5/14 4h( )6/15 5(3 "example.sql" [New]n6L,591Clwritten-19/18 4h() Line: 5 Column:()Line: 6 Column: 3/2 Byte: 5Bh 100%^[ 2/Ah::x Adios, Cowboy nick@artemis:~$ fg mysql MariaDB [nick]> source example.sql ERROR 1050 (42S01) at line 1 in file: 'example.sql': Table 'example' already exists BBMariaDB [nick]> drop table example.sql -> ; ERROR 1051 (42S02): Unknown table 'example.sql' BBMariaDB [nick]> drop table example;sql BQuery OK, 0 rows affected (0.002 sec) BB sourctablenexample.sqltable example; BQuery OK, 0 rows affected (0.004 sec) BB BMariaDB [nick]> select * from example; BEmpty set (0.001 sec) BB ourceaexample.sqlselect * from example; ERROR 1050 (42S01) at line 1 in file: 'example.sql': Table 'example' already exists BBMariaDB [nick]> source example.sql ERROR 1050 (42S01) at line 1 in file: 'example.sql': Table 'example' already exists BBMariaDB [nick]> [1]+ Stopped mysql nick@artemis:~$ vim example.sql "example.sql" 6L, 91C▽ cWelcome back, Toothmangcreate table example ( col1 int primary key, col2 int default 0, col3 varchar(30) ); insert7/6e7h8/7h8hi9/8h9in10/9/int11/10into2/114Ch3/12tDhe4/13xEhx5/14/Fha6/15:Byte:1C0hm7/1671hp8/1782hl9/1813he20/19e4h(1/2005hc2/2116ho3/2227hl4/2338h3/22a7h2/2156h1/2025h0/1924h1/20/5h(2/2106hc3/2217ho4/2328hl5/24L9h16/255Ah,7/26%Bh8/273Chc9/28LDho30/29CEhl1/303Fh32/31vByte:ED0h)Line:l113Column:(21-33/32@Byte:vC5hes4Line:311/Column:/34/331Byte:6D2hv5/34h3ha6/35"4hl7/36n5hu8/37i6he9/values40/3958h1/40h9h(2/41hAh23/421Bh,4/43nCh5/442Dh"6/45~Eht7/46-Fho8/47mByte:/E0ho9/48h1ht50/49/2hh1/5013hm2/51h4ha3/52 5hn4/53 6h"5/54 7h)Line: 11 Column: 41-56/55 Byte: D9h; Line:T11tColumn:/57/56lByte: E9ype=SQL Line: 6 Column: 1/2 Byte: 59h 100%i -- INSERT --() Line: 5 Column: 1/18 Byte: 46h 83%4 21 Byte: 30h 66%3 3 Byte: 18h 50%()2 1/1 6h 33%() Line: 1 Column: 1/20 Byte: 1h 16%create table example[+]2 2h 28%1 1/01h 14%d2/1 Byte: 2hr3/2 Byte: 3ho4/3 Byte: 4h 2 1/0 Ah insert7/6e1h8/7h2hi9/8y3in10/9 int11/10into2/11 6h3/12 7he4/13 8hx5/14 9ha6/15 Ahm7/16 Bhp8/17 Chl9/18 Dhe20/19 Eh(1/20 Fh0/19 Eh1/20 Fh(Line: 13 Column: 22/21 Byte: 100hc3/22 1ho4/23 2hl5/24 3h16/25 4h,7/26 5h8/27 6hc9/28 7ho30/29 8hl1/30 9h32/31 Ah)Line: 13 Column: 21-33/32 Byte: FFh() Line: 13 Column: 33/32 Byte: 10Bh()4/33 Chv5/34 Dha6/35 Ehl7/36 Fhu8/37 10he9/values40/39 2h1/40 3h 4 ()5/14h2h()4/13/1h,h35/4 8h,6/5 9h7/6 Ah"8/7 Bhj9/8 Cho10/9 Dhh11/10 Ehn2/11 Fh"3/12 20h)Line: 14 Column: 3-14/13 16h() Line: 14 Column: 121h; 5 3/2 5h(4/3 6h45/4 7h"6/5 8h5/4 7h,6/5 8h7/6 9h"8/7 Ahg9/8 Bhr10/9 Cha11/10 Dhs2/11 Eht3/12 Fhy4/13 30h"5/14 1h)Line: 15 Column: 3-16/15 25h, Line: 15 Column: 17/16 33h 6 ()3/226Ah4/3 7h55/4 8h,6/5 9h7/6 Ah"8/7 Bhr9/8 Chi10/9 Dhc11/10 Ehk2/11 Fh 3/12 40hm4/13 1ho5/14 2hr6/15 3ha7/16 4hn8/17 5hi9/18 6hs20/19 7h"1/20 8h)Line: 16 Column: 3-22/21 36h() Line: 16 Column: 249h; 7 3/2Dh^[ 0-1/0 Bh~@k () Line: 16 Column: 3/22 Byte: 136h 94%~@k () ()5 16 25h 88%~@k () ()4 4 16h 82%~@k () Line: 13 Column: 3/40 Byte: EDh 76%~@k 2 0-1/0Ah 70%~@k 1 3/56 Byte: B3h 64%~@k 0 2 Byte: 7Eh 58%~@k Line: 9 0-1/0 Bh 52%~@k 8 2/2 9h 47%~@k 7 3/18 Byte: 67h 41%~@k col2 int default 0,6 21 Byte: 51h 35%~@k col1 int primary key,5 3 Byte: 39h 29%~@k 6 1 Byte: 51h 35%~@k 7 18 Byte: 67h 41%~@k 8 2/2 Byte: 79h 47%~@k 9 0-1/0 Bh 52%~@k Line: 10 3/52 Eh 58%~@k 1 6 Byte: B3h 64%~@k 2 0-1/0 Byte: EAh 70%~@k 3 3/40Dh 76%~@k ()Line: 14 Column: 3/14 Byte: 116h 82%~@k () ()5 6 25h 88%~@k () (5, "rick moranis");6 22 36h 94%~@k "example.sql"l17L, 331C0written14Bh 100%~@k ~@k ~@k ^[ ::x Adios, Cowboy nick@artemis:~$ nick@artemis:~$ fgg mysql MariaDB [nick]> source example.sql BQuery OK, 0 rows affected (0.002 sec) BB BBQuery OK, 0 rows affected (0.003 sec) BB BBQuery OK, 1 row affected (0.001 sec) BB BBQuery OK, 1 row affected (0.001 sec) BB BBQuery OK, 3 rows affected (0.000 sec) BBRecords: 3 Duplicates: 0 Warnings: 0 BB BMariaDB [nick]> select * from example; +------+------+--------------+ | col1 | col2 | col3 | +------+------+--------------+ | 1 | 0 | nick | | 2 | 0 | toothman | | 3 | 0 | john | | 4 | 0 | grasty | | 5 | 0 | rick moranis | +------+------+--------------+ B5 rows in set (0.000 sec) BB ourceaexample.sqlselect * from example; BQuery OK, 0 rows affected (0.002 sec) BB BBQuery OK, 0 rows affected (0.004 sec) BB BBQuery OK, 1 row affected (0.001 sec) BB BBQuery OK, 1 row affected (0.000 sec) BB BBQuery OK, 3 rows affected (0.000 sec) BBRecords: 3 Duplicates: 0 Warnings: 0 BB BMariaDB [nick]> source example.sql BQuery OK, 0 rows affected (0.002 sec) BB BBQuery OK, 0 rows affected (0.004 sec) BB BBQuery OK, 1 row affected (0.001 sec) BB BBQuery OK, 1 row affected (0.000 sec) BB BBQuery OK, 3 rows affected (0.000 sec) BBRecords: 3 Duplicates: 0 Warnings: 0 BB BMariaDB [nick]> source example.sql BQuery OK, 0 rows affected (0.002 sec) BB BBQuery OK, 0 rows affected (0.003 sec) BB BBQuery OK, 1 row affected (0.001 sec) BB BBQuery OK, 1 row affected (0.000 sec) BB BBQuery OK, 4 rows affected (0.000 sec) BBRecords: 4 Duplicates: 0 Warnings: 0 BB BMariaDB [nick]> select *xfromeexample; +------+------+------------------------+ | col1 | col2 | col3 | +------+------+------------------------+ | 1 | 0 | nick | | 2 | 0 | toothman | | 3 | 0 | john | | 4 | 0 | grasty | | 5 | 0 | rick moranis | | 6 | 0 | egon from ghostbusters | +------+------+------------------------+ B6 rows in set (0.000 sec) BB BMariaDB [nick]> select * from example; +------+------+------------------------+ | col1 | col2 | col3 | +------+------+------------------------+ | 1 | 0 | nick | | 2 | 0 | toothman | | 3 | 0 | john | | 4 | 0 | grasty | | 5 | 0 | rick moranis | | 6 | 0 | egon from ghostbusters | +------+------+------------------------+ B6 rows in set (0.000 sec) BB ourceaexample.sqlselect * from example; BQuery OK, 0 rows affected (0.002 sec) BB BBQuery OK, 0 rows affected (0.003 sec) BB BBQuery OK, 1 row affected (0.001 sec) BB BBQuery OK, 1 row affected (0.000 sec) BB BBQuery OK, 4 rows affected (0.000 sec) BBRecords: 4 Duplicates: 0 Warnings: 0 BB ERROR 1364 (HY000) at line 22 in file: 'example.sql': Field 'col1' doesn't have a default value BBBMariaDB [nick]> source example.sql BQuery OK, 0 rows affected (0.002 sec) BB BBQuery OK, 0 rows affected (0.004 sec) BB BBQuery OK, 1 row affected (0.001 sec) BB BBQuery OK, 1 row affected (0.000 sec) BB BBQuery OK, 4 rows affected (0.000 sec) BBRecords: 4 Duplicates: 0 Warnings: 0 BB BBQuery OK, 1 row affected (0.000 sec) BB BMariaDB [nick]> select *xfromeexample; +------+------+------------------------+ | col1 | col2 | col3 | +------+------+------------------------+ | 0 | 1 | nick | | 1 | 0 | nick | | 2 | 0 | toothman | | 3 | 0 | john | | 4 | 0 | grasty | | 5 | 0 | rick moranis | | 6 | 0 | egon from ghostbusters | +------+------+------------------------+ B7 rows in set (0.001 sec) BB ourceaexample.sqlselect * from example; BQuery OK, 0 rows affected (0.002 sec) BB BBQuery OK, 0 rows affected (0.003 sec) BB BBQuery OK, 1 row affected (0.001 sec) BB BBQuery OK, 1 row affected (0.000 sec) BB BBQuery OK, 4 rows affected (0.000 sec) BBRecords: 4 Duplicates: 0 Warnings: 0 BB BBQuery OK, 1 row affected (0.000 sec) BB ERROR 1062 (23000) at line 23 in file: 'example.sql': Duplicate entry '0' for key 'PRIMARY' BBBMariaDB [nick]> source example.sql BQuery OK, 0 rows affected (0.002 sec) BB BBQuery OK, 0 rows affected (0.003 sec) BB BBQuery OK, 1 row affected (0.001 sec) BB BBQuery OK, 1 row affected (0.000 sec) BB BBQuery OK, 4 rows affected (0.000 sec) BBRecords: 4 Duplicates: 0 Warnings: 0 BB BBQuery OK, 1 row affected (0.000 sec) BB ERROR 1062 (23000) at line 23 in file: 'example.sql': Duplicate entry '0' for key 'PRIMARY' BBBMariaDB [nick]> source example.sql BQuery OK, 0 rows affected (0.002 sec) BB BBQuery OK, 0 rows affected (0.003 sec) BB BBQuery OK, 1 row affected (0.001 sec) BB BBQuery OK, 1 row affected (0.000 sec) BB BBQuery OK, 4 rows affected (0.000 sec) BBRecords: 4 Duplicates: 0 Warnings: 0 BB BBQuery OK, 1 row affected (0.000 sec) BB BBQuery OK, 1 row affected (0.000 sec) BB electa*xfromeexample;ct *xfromeexample; +------+------+------------------------+ | col1 | col2 | col3 | +------+------+------------------------+ | 1 | 0 | nick | | 2 | 0 | toothman | | 3 | 0 | john | | 4 | 0 | grasty | | 5 | 0 | rick moranis | | 6 | 0 | egon from ghostbusters | | 7 | 1 | nick | | 8 | 1 | nick | +------+------+------------------------+ B8 rows in set (0.000 sec) BB ourceaexample.sqlselect * from example; BQuery OK, 0 rows affected (0.004 sec) BB BBQuery OK, 0 rows affected (0.004 sec) BB BBQuery OK, 1 row affected (0.001 sec) BB BBQuery OK, 1 row affected (0.000 sec) BB BBQuery OK, 4 rows affected (0.000 sec) BBRecords: 4 Duplicates: 0 Warnings: 0 BB BBQuery OK, 1 row affected (0.000 sec) BB BBQuery OK, 1 row affected (0.000 sec) BB BMariaDB [nick]> insert into example (col3) values (null); ERROR 1048 (23000): Column 'col3' cannot be null BBMariaDB [nick]> insert into example (col3) values (null); ERROR 1048 (23000): Column 'col3' cannot be null BBMariaDB [nick]> insert into example (ol2,)1,nnull);null); ERROR 1048 (23000): Column 'col3' cannot be null BBMariaDB [nick]> insert into example (col3) valuesv('');;;1, null); BQuery OK, 1 row affected (0.001 sec) BB BMariaDB [nick]> insert into example (col3) values (''); BQuery OK, 1 row affected (0.001 sec) BB BMariaDB [nick]> insert into example (col3) values (''); BQuery OK, 1 row affected (0.001 sec) BB BMariaDB [nick]> insert into example (col3) values (''); BQuery OK, 1 row affected (0.001 sec) BB BMariaDB [nick]> insert into example (col3) values (''); BQuery OK, 1 row affected (0.001 sec) BB BMariaDB [nick]> insert into example (col3) values (''); BQuery OK, 1 row affected (0.001 sec) BB BMariaDB [nick]> select * from example; +------+------+------------------------+ | col1 | col2 | col3 | +------+------+------------------------+ | 1 | 0 | nick | | 2 | 0 | toothman | | 3 | 0 | john | | 4 | 0 | grasty | | 5 | 0 | rick moranis | | 6 | 0 | egon from ghostbusters | | 7 | 1 | nick | | 8 | 1 | nick | | 9 | 0 | | | 10 | 0 | | | 11 | 0 | | | 12 | 0 | | | 13 | 0 | | | 14 | 0 | | +------+------+------------------------+ B14 rows in set (0.000 sec) BB BMariaDB [nick]> source example.sql BQuery OK, 0 rows affected (0.002 sec) BB BBQuery OK, 0 rows affected (0.004 sec) BB BBQuery OK, 1 row affected (0.001 sec) BB BBQuery OK, 1 row affected (0.000 sec) BB BBQuery OK, 4 rows affected (0.000 sec) BBRecords: 4 Duplicates: 0 Warnings: 0 BB BBQuery OK, 1 row affected (0.000 sec) BB BBQuery OK, 1 row affected (0.000 sec) BB BMariaDB [nick]> select *xfromeexample; +------+------+------------------------+ | col1 | col2 | col3 | +------+------+------------------------+ | 1 | 0 | nick | | 2 | 0 | toothman | | 3 | 0 | john | | 4 | 0 | grasty | | 5 | 0 | rick moranis | | 6 | 0 | egon from ghostbusters | | 7 | 1 | nick | | 8 | 1 | nick | +------+------+------------------------+ B8 rows in set (0.000 sec) BB insert*intomexamplee(col3)fvaluesa(''); ERROR 4025 (23000): CONSTRAINT `example.col3` failed for `nick`.`example` BBMariaDB [nick]> insert into example (col3) values (''); ERROR 4025 (23000): CONSTRAINT `example.col3` failed for `nick`.`example` BBMariaDB [nick]> describeeexample; +-------+-------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-------+-------------+------+-----+---------+----------------+ | col1 | int(11) | NO | PRI | NULL | auto_increment | | col2 | int(11) | YES | | 0 | | | col3 | varchar(30) | NO | | NULL | | +-------+-------------+------+-----+---------+----------------+ B3 rows in set (0.001 sec) BB BMariaDB [nick]> show create table example; +---------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Table | Create Table | +---------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | example | CREATE TABLE `example` ( `col1` int(11) NOT NULL AUTO_INCREMENT, `col2` int(11) DEFAULT 0, `col3` varchar(30) NOT NULL CHECK (`col3` <> ''), PRIMARY KEY (`col1`) ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 `ENCRYPTION_KEY_ID`=100 | +---------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ B1 row in set (0.000 sec) BB BMariaDB [nick]> exit BBye Bnick@artemis:~$ exit logout Connection to artemis.cs.csub.edu closed. nick@Vaxis:~$ exit exit