6

I'm sorry if it's not appropriate to answer your own question but I'd like to post the solution to this problem just in case someone has the same issue. The commands sudo /etc/init.d/mysql start sudo /etc/init.d/mysql stop sudo /etc/init.d/mysql restart solve the issue.


2

The problem looks like you are trying to create a table with two primary keys, one on column ID and one on column TIMESTAMP. A table is only allowed to have one primary key. You can have multiple keys, they can be unique or not unique (referring to the column values), they can index the combined values of multiple columns, etc., but there can ONLY be one (or ...


2

We all know that phpMyAdmin can be flaky sometimes. Unfortunately, I can't tell you how to fix it -- but I can tell you how to use mysql50 shell from the command line. Try stuff like this: mysql50 shell SHOW DATABASES; USE pset7; SHOW TABLES; DESCRIBE users; SELECT * FROM users; SELECT COUNT(*) FROM users; quit It's rock-solid and reliable, and it will ...


1

Unless I'm missing something, that is not a sql query. A sql query is something like "SELECT columns FROM table WHERE condition". That is html code.


1

This seems to have resolved itself by restarting the development environment.


1

There is a way to reset the IDE without fixing the PHP interpreter. You can create a new workspace. Go to https://cs50.io/sharmapranjal and click on the big gray square that says "+ Create a new workspace". In the screen that follows, you will be prompted to "Choose a template ..." Be sure to select the last one in the list: "Harvard's CS50". Then start ...


1

Fulltext index is only supported on columns that are either of type varchar, text, or char, and some others you likely won't use. latitude and longitude are both of type decimal. See this page, quote below. Only columns of type char, varchar, nchar, nvarchar, text, ntext, image, xml, and varbinary(max) can be indexed for full-text search. Edit: I saw ...


1

OK... looks like there is a quick fix this that it was not implicit in the description. By adding ALTER TABLE yourtablename ADD CONSTRAINT uq_yourtablename UNIQUE(column1, column2); it seems that the problem is solved, this initially should do the trick. :-)


1

The Error: Token mismatch has to do with your session authentication. Simply force-reloading the page with Ctrl+F5 might help. If that does not help, you could try clearing your cookies from cs50.io domains. Meanwhile, you can move forward without using phpMyAdmin! Try following my suggestions here.


1

OK, so I figured out what to do: Open a new Terminal tab in the IDE. Verify that mysqld is running: ~/workspace/ $ mysql50 status MySQL is not running. ~/workspace/ $ mysql50 start * Starting MySQL database server mysqld ...done. * Checking for tables which need an upgrade, are corrupt or were not closed cleanly. Verify that apache2 is running: ~/...


1

The PHP parameter session.gc_maxlifetime determines how long a php session will stay alive and is set in your php.ini file. It is probably 1440 [seconds] (24 minutes). The phpMyAdmin setting can be found at Settings -> Features -> General -> Login cookie validity (in phpMyAdmin) and is probably 86400 [seconds] (24 hours). It determines how long a phpMyAdmin ...


1

the answer is of course to ensure that /etc/hosts is updated per the specs. see the "Getting Started" section! Next, in a terminal window, execute sudo gedit /etc/hosts in order to run gedit as the appliance’s "superuser" (aka "root") so that you can edit what’s otherwise a read-only file. Carefully add this line at the bottom of that file, ...


1

Try http://localhost/phpmyadmin I always accessed phpmyadmin using that url.


1

I had this same problem and did find a resolution. After trying numerous suggestions and trying to recreate missing tables, it just went from one problem to another, without ever getting to a satisfactory solution. Unfortunately, the best solution turned out to be the most drastic. The problem you have is that one or more tables that should have been ...


1

Open a Terminal and type mysql -u jharvard -p enter the password then typ show databases There should be one called pset7 so you can access it via use pset7 Then type show table and you should see the table users and with select * from users you can see that the values are stored in the database


1

Just had the same problem. The comments give clues and partial answers, but not complete details. curiouskiwi provided a complete solution: 1) run sudo dpkg-reconfigure phpmyadmin in a terminal window. IMPORTANT: ACCEPT ALL DEFAULTS GIVEN. Changing defaults may not result in a complete fix. 2) Next, run sudo service apache2 restart This is described at ...


1

If you're working on Windows 7 and the internet is working on the appliance properly, you should be able to access the appliance by Hit Windows Key + R from your keyboard to open up Run. Type\\w.x.y.z where w.x.y.z is the IP of the appliance (can be found at the bottom-right of the appliance window). Hit Enter from your keyboard. If you got a little window ...


1

It depends on what kind of access you're shooting for, and how your virtual network is setup on vmware. I personally use bridged connection so the virtual machine has its own ip address rather than sharing with the host. If you do the same, you should be able to ping the ip address of the virtual machine from your windows environment to verify connectivity. ...


1

First thing first. From what you said, I assume you are trying to access phpMyAdmin from inside yur appliance. As a rule of thumb, ALWAYS run update50 when you start your appliance. If you get the "Forbidden" error when you load phpMyAdmin, remember you should log in as jharvard/Crimson If you get the "Forbidden" error when you load a table in ...


1

Just to back up a step. You are able to access http://pset7 okay? But http://pset7/phpMyAdmin gives you a forbidden? Did you chmod all the files as outlined in the pset instructions in the Getting Started section?


Only top voted, non community-wiki answers of a minimum length are eligible