I’ve managed to setup the Relational Database Course locally, according to the official instructions  and even completed the first module ‘Learn Bash by Building a Boilerplate’. However, on the second section ‘Learn Relational Databases by Building a Mario Database’ the program gets stuck on question #14 as shown in Figure 1. I’ve tried closing and reopening the terminal, using the Reset button, and even resetting the whole course with the command
Remote-Containers: Rebuild Containeraccording to the instructions in , but the problem persisted. Additionally, hitting the button Run only results in the message ‘You should display the details of “second_table”’ being shown. Thanks in advance and sorry if I’m missing something obvious.
 Relational Database Course – How to Learn SQL in VSCode Using Docker and freeCodeCamp
Figure 1. VS Code stuck on Section 2, question 14 of the Relational Database Course.
Hey @diegocpal, any luck in getting passed this? I don’t think you’re missing anything obvious. I’m not quite sure what the problem is…
I just gave it a test and was able to get passed this step and other similar ones - after doing them as intended, and after resetting like you did. The SQL tutorials can be a little finicky - they generate logs that are read for the tests. Sometimes after resetting, the logs don’t get generated as intended and you get stuck without being able to pass a step. Although, I believe that should be mostly resolved and they are quite stable now. I don’t think that’s what is happening here, since I don’t see any output in your screenshot after you enter the command. You should see info about that table. Some of those commands in the middle should have shown you that.
I can tell you that the commands at the bottom, where the prompt has
second_database-> instead of
second_database=>, shouldn’t work. When the prompt doesn’t have the
=>, it means that a command you entered on a previous line didn’t get completed. More specifically, in SQL, you can use multiple lines to enter a command. So if you press enter without a complete command (mainly, a missing semi-colon or missing quote), it will go to the next line, change the prompt, and you can continue with that command until you finish it correctly. Pretty sure that’s what is happening with the bottom few.
You said you tried using
Remote-Containers: Rebuild Container to start over. You did that and got the same result both times? I would try that again and make sure to start the tutorial from the beginning again, by entering the URL.
This is a strange one, I’m hoping that you were able to resolve this already - let me know if the problem continues.
Thanks for the response. Unfortunately, I haven’t been able to resolve it. I,ve created a new folder to store the ‘rdb-alpha’ folder and started the lesson from a fresh start. Additionally, I tried to be much more careful with semicolons and the like, as you suggested. However, the lesson got stuck exactly on the same question as shown in Figure 1 and then I used the ‘reset’ button, to no effect. Also, I would like to add that in the meantime I managed to complete the modules: ‘Learn Bash Scripting by Building Five Programs’ and ‘Learn Nano by Building a Castle’ setting up the environment in the same manner. So, for some reason, the problem appears to be specific to this module and question. Thanks in advance.
Figure 1. State of the environment after pressing the reset button and trying again.
I’m stumped on this one @diegocpal. Seems like it should work - the
CREATE TABLE worked, the
\d worked, then the
\d second_table doesn’t do anything Only thing I can think of is to see what’s different between your setup and a working setup. The things within the container/vm should be the same, that’s the point of it. But you could check the psql version, postgresql version, ubuntu version? And other things outside of it like the vscode version, remote-containers extension version - is your rdb-alpha repo up to date? I see you’re using linux mint? maybe that is causing problems. Doesn’t seem like it should, but I can’t be sure.
Yea - sorry I don’t have an answer for you at the moment. If you have another machine or OS maybe try on there?
I am having a similar issue with the Mario Database section specifically. For me it has happened three time on three different lessons. The only common point I can think of is that I pressed enter and then realised that my input had an error. This last time it was that I had typed 'd instead of \d to display the details. After this the whole thing stopped responding to any input.
I tried adding a ; to see if it would start recognising input again, but I just ended up starting again all three times.
I think I have found a fix for my issue.
If I press control-D (on mac. I don’t know what it would be on any other system) it exits the psql prompt and goes back to the codeally projects folder prompt. From there I relogged using the method from step 2 of the Mario Database lesson and the name of the database I was just using (mario_database). From there I was able to continue from the point I had stopped at.
Hopefully this makes sense and helps someone if they are having the same problem.
Hi , so I had similair issues in the command line when I pressed a wrong key or a combination of keys resulting in the ‘->’ in stead of ‘=>’ . I then just logged in again to postgresql (press up arrow key you will get the command you previously typed and enter) AND connect to your database , so ‘c\ second_database’ . I don’t know if you did this already (the connecting part) . Perhaps you can make a screenshot of the screen when you type in ‘\l’ and ‘\d’ (without table name).
And also the message ‘terminating connection due to adminstrator command …’ might indicate that maybe you don’t have the permissions set up properly? I use Linux mint as well and I had to add my username to the docker user group for CodeRoad to work (instructions are on the installation page of the course).
I’m also having a similar issue \d does not work.
thanks Mot01, i was stuck on a : second_database (> and the commands didn’t worked. AFter reading your comment, i had used an CREATE TABLE first_database(; and never closed the “)” so the code was always adding things to it.
Finally adding “);” for closing the loop worked as then i got the error message and could re-type the code.
Strange though that it letted me use the \c and \d to connect to new databases.
Same thing here. As others mentioned it, this happens when some command is uncompleted or wrong. To fix this issue I executed the \q command to disconnect from database and then re-run all the commands to come back to the database again.
Thanks for posting your solution. This worked for me to get me unstuck as I had the same problem.
Thanks inputduck for your hint!
I got stuck on this step: “Looks like they’re all gone. Remind yourself what columns you have in
second_table by looking at its details.”
\d command wasn’t working, even with
=> instead of
To fix it per inputduck’s hint:
D to exit PostgreSQL.
- Login again to PostgreSQL
psql --username=freecodecamp --dbname=postgres
- Re-connect to the database.
\d second_table should work now.
The CodeRoad Application seems to not be functioning well. Does anyone has any solution to this? It has been spinning on my computer for a while now.
Try shutting the whole tab and restarting/
Hi, I have the same problem, how did you solve it please?
I was having a similar issue. Control+D and reconnecting with step 2 method worked for me. thanks! @inputduck