the_quick Posted October 7, 2015 Posted October 7, 2015 Morning guys I have been given task to provide access to mysql command line. year 10 need to do some task for controlled assessment and they need to create databases and run some queries on them. I remember doing something like this at Uni, using a terminal to linux server, but can't remember how it was done. Anyone done it? Probably can be done with putty and linux server, but not sure if giving access to putty to students is a great idea. Would you mind sharing your solutions please? Thanks Kris
benjie Posted October 7, 2015 Posted October 7, 2015 What about phpmyadmin. Webgui for mysql databases uses php, so accessible via web browsers. I don't know much about setting up ssh jails but will give you a way to give them ssh access but restricted.
unixman_again Posted October 7, 2015 Posted October 7, 2015 What about https://www.sqlite.org/download.html ?
the_quick Posted October 8, 2015 Author Posted October 8, 2015 Thanks guys. Unixman - that software is not using standard sql - create database or show tables command do not work at all. So can't use it. As students supposed to create databases and tables using standard SQL. Benjie - yeah, probably will try that. My another problem is that 30 students need to create database each and work on it for several weeks. Might install WAMP just on all computers in that classroom. Thanks again for ideas.
unixman_again Posted October 8, 2015 Posted October 8, 2015 Sorry about that - I haven't used it for 6 years and I can't remember what it does and doesn't do.
pcstru Posted October 8, 2015 Posted October 8, 2015 Might install WAMP just on all computers in that classroom. They will then be restricted to those computers and if it is a local install, backups might be a problem. We provide a LAMPS server (ubuntu server 14.04 LTS) for BTEC students needing access to MySQL and PHP. It's very simple to set one up a server. They can connect to a command line if necessary but I think they use myPHPAdmin. The server is backed up so no chance of students loosing (or claiming to!) their work as deadlines approach. It would be possible to put the windows build of mysql.exe on clients and they could then use that to connect and get a command prompt.
ijk Posted October 8, 2015 Posted October 8, 2015 Possible solution Install MySQL on any server Bulk create MySQL users with appropriate permissions. See: http://www.edugeek.net/forums/how-do-you-do/46692-mysql-script-batch-create-users-dbs.html Configure MySQL server to accept connections appropriately (IP, hostname, etc) Configure server firewall to accept connections to MySQL port Install MySQL client on workstations. Configure workstation firewall to allow connections to MySQL server IP and port. Students connect to MySQL using the Windows command Prompt.
LosOjos Posted October 8, 2015 Posted October 8, 2015 We've been experimenting with various "portable server" setups, haven't settled on a particular one yet but uWAMP appears to be the best to me. Assuming their Documents folder is mapped to a drive (or can be), we've got it setup so that the program sits on each PC's C: drive, with Apache and MySQL setup to look in a folder on the mapped drive. This way, whichever student logs in and starts the server will get their own site running and they just save to their Documents folder, utilising your existing backup system and not tying them to one machine. Plus it means they each have their own DB so if they accidentally drop all tables, it's only their own work that's gone!
the_quick Posted October 8, 2015 Author Posted October 8, 2015 Thanks guys fro replies. Yes, databases would with Wamp sit on local c drive, but teacher is OK with that. We going to put password on mysql. LosOjos your solution looks very interesting, could you tell me how you made to apache and mysql to look at mapped drive? Thanks
sonofsanta Posted October 8, 2015 Posted October 8, 2015 MySQL Workbench lets you run SQL commands, as well as lots of other tools. It's an MSI so easy to deploy We have it set up with a WAMP server onsite; you can skip the PHP bit, though it's the work of minutes to set up. I wrote a guide up. You can create individual databases for each student and assign permissions if you want to be certain they can't wreck each others work.
LosOjos Posted October 8, 2015 Posted October 8, 2015 (edited) LosOjos your solution looks very interesting, could you tell me how you made to apache and mysql to look at mapped drive? Sure For these examples, I'm going to assume your user's Documents are mapped to U: drive, and that they contains a folder called website, which in turn contains folders called www and mysql. You need to edit your apache config to point at the mapped drive and folder. Which conf file to edit will depend which portable server you're using, but it's usually httpd.conf. In there, you'll see a section, which will have an option 'DocumentRoot' - change that to U:/website/www/ Next, edit your MySQL conf. Look for an option called 'datadir' and change it to U:/website/mysql/ - you'll also want to copy the contents of the original data dir to the new directory, and possibly hide the directory from the user as you won't want them editing the files directly. Start up your server and it should be working you may need to change the port that's used (80) to something else, we use 8080 as it's easy to remember Edited October 8, 2015 by LosOjos
webman Posted October 8, 2015 Posted October 8, 2015 For a more lightweight web-based SQL interface, I recommend Adminer. I use it all the time for the majority of SQL work, but for other things I use HeidiSQL.
PaulBM Posted June 14, 2016 Posted June 14, 2016 I'm currently testing using the MySQL Workbench. I have installed MySQL on a server using the MySQL Community Installer. MySQL :: Download MySQL Community Server I've set up a few test users with schema privileges of username% and no administrative priviledges. This allows them to create databases that begin with their username. So far so good.
RichCowell Posted June 24, 2016 Posted June 24, 2016 Just been asked to install MySQL for students next year, and I know absolutely nothing about MySQL or anything similar... Would someone who's got it sorted successfully in a school for student use be able to give me simple instructions about the best way to get it done? I could do with getting it up and running asap so they can test it before September...
jmoldfield Posted August 23, 2016 Posted August 23, 2016 Just been asked to install MySQL for students next year, and I know absolutely nothing about MySQL or anything similar... Would someone who's got it sorted successfully in a school for student use be able to give me simple instructions about the best way to get it done? I could do with getting it up and running asap so they can test it before September... Sorry to resurrect this but I'm in the same boat. Tried LosOjos' suggestion but with no success. Any advice would be greatly appreciated.
RichCowell Posted August 23, 2016 Posted August 23, 2016 Sorry to resurrect this but I'm in the same boat. Tried LosOjos' suggestion but with no success. Any advice would be greatly appreciated. Drop me a pm and I'll get back to you when I'm back at a PC later...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now