LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 02-10-2005, 08:08 PM   #1
nenyo
Member
 
Registered: Jan 2005
Location: Alamogordo
Distribution: Gentoo 2005.0
Posts: 136

Rep: Reputation: 15
Smile PHP/MySQL and Apache server setup


this post has a lot that goes with it. ok. here goes...
i recently took a web design course that focused mostly on PHP and MySQL. i know how to use a little bit of the basics in both. of course i want to learn more so i want to set up a server on my comp. it was a highschool class useing windows computers(bleh) so of course we learned nothing of setup. i put PHP, MySQL, and Apache on my computer. i went to "0.0.0.0" and a page came up saying that the sever was working, but i cant upload anything when i try and log on as root or my username.

ok. now the questions...
1) How do I how do i set up a username to use for a login with an FTP prog?
2) Where are the files i upload actualy stored on my computer?
3) How do I set up a username and password for MySQL?
4) How do I change the IP "0.0.0.0" to something else?

I REALY REALY don't want to have to read a huge manual about each of these progs right now. i just want to know the basics of setup right now and i will read about them later.

Just so you know, i'm kind of new to linux. please speak in terms that a newbie would understand.
i'm running mandrake 10.1 on an averatec 3150 laptop.
 
Old 02-11-2005, 12:12 AM   #2
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,475

Rep: Reputation: 87
Re: PHP/MySQL and Apache server setup

ok. now the questions...
1) How do I how do i set up a username to use for a login with an FTP prog?

>As far as I know, you need to setup and configure a complete FTP server. This is not so tough (I've never done it, though) - look for a howto or FAQ there should be some easily obtainable.

2) Where are the files i upload actualy stored on my computer?

>As I have it you select a directory(ies) during configuration of the FTP server that will be available for the user to choose from when he uploads files.

3) How do I set up a username and password for MySQL?

> Do this:

1. Make sure the mysql server is running: In the /usr/local/mysql/bin directory do

mysql_safe --user=mysql &

2. Type in mysql -u root mysql

3. At the mysql> prompt type set password for root@localhost=password('your_password_here');

You have now created the root user. To create other users, I think all you need to do is login as root into mysql, then "Grant" privigeges to a name that will become the new user:

1. Log in: mysql -u root -p <ENTER>
2. At the Password: prompt, type the password you entered above.
3. You might need to have a database already existing fro this to work from 4 onward:
4. Type grant select, insert, update delete on <database name> to normaluser@localhost identified by 'your_user_pass_here';
5. Type flush privileges; <ENTER>

This should create a user called "normaluser" who can select items from, insert items into, update items and delete items in the <database name> database.

To log in as this user do

mysql -u normaluser -p

and at the password prompt enter the password you entered in step (4) above.

4) How do I change the IP "0.0.0.0" to something else?

> Dunno - I think you need to take a look at the ServerName paramter in Apahce's httpd.conf.

Just so you know, i'm kind of new to linux. please speak in terms that a newbie would understand.

>I hope these are clear enough? Write again if you still have problems.

Kind regards,
 
Old 02-11-2005, 08:20 AM   #3
nenyo
Member
 
Registered: Jan 2005
Location: Alamogordo
Distribution: Gentoo 2005.0
Posts: 136

Original Poster
Rep: Reputation: 15
THANK YOU!! mysql works fine. ill have to look for a faq on seting up ftp like you said. do you know of a good one?
(your directions were very clear btw. thx.)
 
Old 02-11-2005, 09:18 AM   #4
nicolas9510
LQ Newbie
 
Registered: Mar 2004
Posts: 19

Rep: Reputation: 0
personnaly i like proftpd
http://www.proftpd.org
i use webmin to configure stuff
its has a proftps sectionhope it helps
 
Old 02-12-2005, 07:31 AM   #5
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,475

Rep: Reputation: 87
Quote:
Originally posted by nenyo
THANK YOU!! mysql works fine. ill have to look for a faq on seting up ftp like you said. do you know of a good one?

>No, sorry! I've never needed to do something like that. What I've learned so far in using and supporting Linux commercially is LEARN -ONLY- WHAT YOU NEED.

>(your directions were very clear btw. thx.)
Hey, thanks! It's a pleasure to help out.
 
Old 02-12-2005, 01:19 PM   #6
nenyo
Member
 
Registered: Jan 2005
Location: Alamogordo
Distribution: Gentoo 2005.0
Posts: 136

Original Poster
Rep: Reputation: 15
ok so i logged in as root and put in the line
=================================
grant select, insert, update, delete, create, drop, alter on user to nenyo@localhost identified by '**bla**';
=================================

i then went to the user table in the mysql database, and it said i had no privleges. root was all "Y" and nenyo was all "N". shouldn't it have changed those that i stated to "Y"??? what happened...

Code:
+-----------+-------+------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+
| Host      | User  | Password         | Select_priv | Insert_priv | Update_priv | Delete_priv | Create_priv | Drop_priv | Reload_priv | Shutdown_priv | Process_priv | File_priv | Grant_priv | References_priv | Index_priv | Alter_priv | Show_db_priv | Super_priv | Create_tmp_table_priv | Lock_tables_priv | Execute_priv | Repl_slave_priv | Repl_client_priv | ssl_type | ssl_cipher | x509_issuer | x509_subject | max_questions | max_updates | max_connections |
+-----------+-------+------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+
| localhost | root  | 2e782c85379a326e | Y           | Y           | Y           | Y           | Y           | Y         | Y           | Y             | Y            | Y         | Y          | Y               | Y          | Y          | Y     | Y          | Y                     | Y                | Y            | Y               | Y                | |            |             |              |             0 |           0 |               0 |
| localhost |       |                  | N           | N           | N           | N           | N           | N         | N           | N             | N            | N         | N          | N               | N          | N          | N     | N          | N                     | N                | N            | N               | N                | |            |             |              |             0 |           0 |               0 |
| localhost | nenyo | 1a4b9a0957282400 | N           | N           | N           | N           | N           | N         | N           | N             | N            | N         | N          | N               | N          | N          | N     | N          | N                     | N                | N            | N               | N                | |            |             |              |             0 |           0 |               0 |
+-----------+-------+------------------+-------------+-------------+-------------+-------------+-------------+-----------+-------------+---------------+--------------+-----------+------------+-----------------+------------+------------+--------------+------------+-----------------------+------------------+--------------+-----------------+------------------+----------+------------+-------------+--------------+---------------+-------------+-----------------+
 
Old 02-12-2005, 01:37 PM   #7
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,078

Rep: Reputation: 297Reputation: 297Reputation: 297
I think you need to specify the database and table both in your grant statement. Here's how I create a database named blahdb for a normal user (named blah) to use, as MyhSQL root:

create database blahdb;
grant usage on * to to 'blah'@'localhost' identified by 'whatever';
grant all on blahdb.* to 'blah'@'localhost';

User blah will now have all priviliges on database blahdb. You can assign a subset of priviliges such as select, insert, etc.
 
Old 02-12-2005, 01:48 PM   #8
nenyo
Member
 
Registered: Jan 2005
Location: Alamogordo
Distribution: Gentoo 2005.0
Posts: 136

Original Poster
Rep: Reputation: 15
ok that solves one problem but what if i wanted to create a database with someone other than root?

UPDATE=-=-=-
nope. sry. that didn't work either. my user still can do nothing but look at all the pretty letters.
(according to the user table)

UPDATE=-=-=-
once again i appolegize. i tend to reply before i get all the info. that did solve one problem, although it said differently in the user table, and i cannow edit a database but i can still not create one with a normal user. only root.

Last edited by nenyo; 02-12-2005 at 02:01 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dreamweaver, PHP, MySQL, and Apache Web server bentman78 Linux - Software 18 02-06-2005 05:09 AM
Apache+php on one server and MySQL on onother server? goe Linux - Newbie 3 08-19-2004 04:25 PM
Apache/PHP/MySQL Setup Help jobless_joe Linux - Software 2 05-30-2004 01:55 PM
Apache PHP MySQL Setup after Slackware 9.0 Installation initself Slackware 37 12-20-2003 06:48 AM
Installing PHP and MySQL w/ Apache web server dcrealm47 Linux - Newbie 5 02-26-2003 11:21 AM


All times are GMT -5. The time now is 11:31 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration