LinuxQuestions.org
Visit Jeremy's Blog.
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 01-17-2003, 02:27 PM   #1
vher
LQ Newbie
 
Registered: Dec 2002
Posts: 17

Rep: Reputation: 0
apache/php/mysql problem


i need help i just configure my redhat 8.0 installed all the rpm from the cD itself

apache-2.x.x
php.2.x.x
mysql

now what i need is to access the mysql database.

upon installing those rpm's from the CD i tried accessing the database by typing

> mysql -u root -p

i pressed enter after asking for my password
then after that i got in and logout form my sql...

now i change my root password into 'xxx' by typing

> /usr/bin/mysqladmin -u root -p password 'xxx'

press enter again

and tried to access the mysql again by using the password i typed in and go in again from terminal login but my question is that i cant access the database from php by connections.

so is there anynoby can help me how to configure my server pls i badly need to configure it.
 
Old 01-17-2003, 02:38 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975
http://www.linuxquestions.org/questi...threadid=41846

do not double post. did you not even read the rules you agreed to?
 
Old 01-19-2003, 09:34 AM   #3
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
My guess is that you do not have the permissions set up for your database. Lets say you have a database called database_1 and you want the user "phpuser" to have viewing and adding privelages. First you must add the user "phpuser" and set a password. Lets say the password is password. Now you grant access to databse_1 for phpuser with the following in MySQL:

GRANT SELECT,INSERT on database_1.*
TO phpuser@localhost IDENTIFIED BY "password";

Now phpuser has viewing and adding privelages to the database.
 
Old 01-19-2003, 03:04 PM   #4
wdingus
Member
 
Registered: Aug 2001
Location: Kingsport, TN
Distribution: RHEL & FC
Posts: 267

Rep: Reputation: 30
After changing the root password with mysqladmin could you login via command-line mysql text client with root and that password? Did you "mysqladmin reload"? When you change passwords mysql has to be reloaded. Is the only problem with PHP? Any specific app or something you're writing yourself? The root mysql user should be able to access any database...
 
  


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
Mysql,php or apache problem? intercodes Linux - Software 3 11-18-2005 11:20 AM
LAMP(Linux, Apache, MySQL, PHP) Problem gamehack Slackware 7 08-17-2004 02:52 PM
Apache Mysql Php: mysql with php doesn't work breakerfall Linux - Networking 6 12-27-2003 08:59 PM
Apache / PHP / Mysql config problem - debian bandit Linux - Software 14 09-03-2003 09:04 AM
php-nuke with apache php mysql c0c0deuz Linux - Software 0 03-30-2003 06:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:54 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration