Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

In trying to learn how to work with the LAMP stack, I've hit a wall with MySQL. I can't seem to find a good reference for the first time setup of MySQL to be used with Apache and python. So, my question is four-fold:

1) Under what circumstances should I create my first database. That is, what user do I use (Apache's http user? root?)

2)How do permissions work?

3) Do I have to do anything on the MySQL side to make MySQL talk to Apache, or MySQL to talk to Python/Django?

4) Is there a good resource online that describes setting all of this up? I've found a bunch for using a database once it's in place, but none for the initial setup?

Notes: I'm trying to run my LAMP stack on a dedicated little box for testing/learning purposes only, so I don't have access to any DBA that could help me, as much as I'd like one.

share|improve this question

2 Answers 2

up vote 3 down vote accepted

1) Under what circumstances should I create my first database. That is, what user do I use (Apache's http user? root?)

You create a database when you want to store data in it. You would do it as MySQL's root user.

2)How do permissions work?

See the Access Privilege System and User Account Management pages in the documentation.

3) Do I have to do anything on the MySQL side to make MySQL talk to Apache, or MySQL to talk to Python/Django?

Create a database, create a user for the database, and populate a database. Additional details are going to be specific to the application.

4) Is there a good resource online that describes setting all of this up? I've found a bunch for using a database once it's in place, but none for the initial setup?

The MySQL manual is fantastic documentation. You would run the mysql client if it is already installed in your system. Recommendations specific to your distribution package cannot be provided without your distribution being identified. If you want to use one of MySQL's releases directly, there will be a README and other incredibly verbose documentation within the tarball.

share|improve this answer

If using MySQL from the commandline is giving you to much trouble you can also install phpMyAdmin. Just download it to your web root (NOT ON A PRODUCTION MACHINE!) and then edit the sample.config.inc file to enter the mysql username/password and visit http://localhost/phpmyadmin

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.