So after spending about 40 minutes (I was not yet a nerd again) trying to figure out what sql they had installed in multilab (mysqld nonexistent, ps au | grep mysqld showed) remotely -- using PuTTy -- because I didn't want to drive to campus,hw wrote:# (1pt) Visit MultiLab. Login to a machine, and login into MySQL. Create table customers(lname,fname,address). Insert marek's record, print contents of the table and attach to hw4.
ls /usr/bin/*sql* turned up 'sqlite' and 'sqlite3' which looked promising
So,
Code: Select all
penstemon:~> man sqlite3
penstemon:~> sqlite3 data1.db
SQLite version 3.4.2
Enter ".help" for instructions
sqlite> CREATE TABLE Customers(lname, fname, address);
sqlite> INSERT INTO Customers(lname, fname, address)
...> VALUES('Marek', 'Victor', '22 Broadway Lexington KY');
sqlite> SELECT * FROM Customers;
Marek|Victor|22 Broadway Lexington KY
sqlite> .headers ON
sqlite> SELECT * FROM Customers;
lname|fname|address
Marek|Victor|22 Broadway Lexington KY
sqlite> .mode TABS
mode should be one of: column csv html insert line list tabs tcl
sqlite> .mode tabs
sqlite> SELECT * FROM Customers;
lname fname address
Marek Victor 22 Broadway Lexington KY
sqlite> .exit
penstemon:~> exit