Report this

What is the reason for this report?

Set up a website with a database on a webserver

Posted on February 22, 2016

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!



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!

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.

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.