Question

Set up a website with a database on a webserver

Hello, a while ago I set up a teamspeak server on an ubuntu 14.04 x64 server, no problems with this whatsoever. But recently I also wanted to make this server perform as an webserver. So I installed the LAMP stack and phpmyadmin. And I transfered my files trough WinSCP. When I go to the ip-adres I can see the homepage but I can’t really go further than that because all of the other pages require the database. So my question is, where and how do I put the mysql tables? Everything worked when I ran the site on my local WAMP so I would like it if it also worked on a real webserver. I hope someone can help me. Thanks in advance!

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

This question was answered by @sandidgec:

You can set up all your mySQL tables, etc… via (terminal)/command line, and there’s a couple GUI mySQL things out there. Here’s a small example of command to create your database, after that it’s a matter of the actual tables you need… and so on. I know this leaves a lot to do… but there’s plenty of resources out there on DBA admin.

CREATE DATABASE foo;
GRANT ALL PRIVILEGES ON foo.* TO "foo-dba"@"localhost" IDENTIFIED BY "foopassword";
GRANT DELETE, INSERT, SELECT, UPDATE ON foo.* TO "foo"@"localhost" IDENTIFIED BY "anotherpassword";

View the original comment