addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1linklocation-pinm-swarmSearchmailmessagesminusmoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruserwarningyahoo

Virtual Tech Self-Study Message Board › Lesson 05: MySQL Marinate, Season 1

Lesson 05: MySQL Marinate, Season 1

Sheeri Kritzer C.
sheeri
Group Organizer
Boston, MA
Post #: 120
This space is reserved for updates and questions about Chapter 5 of the Learning MySQL book being used in the MySQL Marinate Season 1 virtual self-study course. If you want, you can go to the Master Discussion List for MySQL Marinate Season 1.

Note: if you did not load the sample databases in Chapter 3 as per page 102, you can download the file to import from http://tahaghoghi.com...­

­

Yours in marination,

Sheeri K. Cabral
Mike M.
SeabrookMLM
Seabrook, NH
Post #: 23
Here is a first attempt at the Chapter 5 exercises..
gerv
gerv
Sheffield, GB
Post #: 3
On page 156, the book says

LIMIT 10,5 == LIMIT 10 OFFSET 5

However, looking at the manual:
https://dev.mysql.com...­
it seems like this is wrong; LIMIT 10,5 is actually the same as LIMIT 5 OFFSET 10.

Gerv
Patrick H.
user 74304712
Cambridge, MA
Post #: 3
Hi Gerv

Well spotted, I missed that.

LIMIT 10,5 does mean the same as LIMIT 5 OFFSET 10, i.e skip 10 records and return 5 rows.

Patrick
Sheeri Kritzer C.
sheeri
Group Organizer
Boston, MA
Post #: 165
This is a known problem and in fact, is listed on the errata page for the book at:

http://tahaghoghi.com...­

(learningmysql.com redirects to http://tahaghoghi.com...­)
A former member
Post #: 4
I tried opening my source music.sql file that I got from tahaghoghi...

but I get the response that "access denied for user ' '@localhost' to database music

Where do I allow access?
A former member
Post #: 5
I tried opening my source music.sql file that I got from tahaghoghi...

but I get the response that "access denied for user ' '@localhost' to database music

Where do I allow access?


Those are the first two lines then the rest of the code returns "no database selected"
A former member
Post #: 6
Also, in setting it up in ch3, the select user, host \ from user; doesn't produce a result. It says no database selected. Maybe when I ran the code for the music.sql it deleted the NULL database. I think I have to redownload the mysql, maybe?
Patrick H.
user 74304712
Cambridge, MA
Post #: 4
Hi Chip, you need to run music.sql logged into mysql as a super user, usually root. A default mysql installation usually has no password set for root, so to log in as root:

mysql -u root

then run:
source music.sql


Patrick H.
user 74304712
Cambridge, MA
Post #: 5
Hi Chip

The user table is in a database/schema named mysql, so you either need to specify that database in your query or use a 'use' statement to select that database beforehand, i.e.

select user, host from mysql.user;

or

use mysql
select user, host from user;

Hope this helps

Patrick
Powered by mvnForum

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy