LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 05-06-2011, 04:21 PM   #1
tanasqui
LQ Newbie
 
Registered: Apr 2011
Location: Johnson City, TN
Distribution: BTr2, Ubuntu 10 & 11
Posts: 5

Rep: Reputation: 0
attempting to setup lamp server


Error: Cannot connect to the database because: INSERT command denied to user 'webuser'@'localhost' for table 'visitor'

mysql> select Host, User, Password, Select_priv, Insert_priv, Update_priv from user where User='webuser';
+-----------+---------+----------+-------------+-------------+-------------+
| Host | User | Password | Select_priv | Insert_priv | Update_priv |
+-----------+---------+----------+-------------+-------------+-------------+
| localhost | webuser | | Y | Y | Y |
+-----------+---------+----------+-------------+-------------+-------------+
1 row in set (0.00 sec)

<?php
$host="localhost"; // Host name
$username="webuser"; // Mysql username
$password=""; // Mysql password
$db_name="_main"; // Database name
$tbl_name="page"; // Table name

// Connect to server and select databse.
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
?>
 
Old 05-06-2011, 04:46 PM   #2
yancek
Guru
 
Registered: Apr 2008
Distribution: PCLinux, Slackware
Posts: 5,094

Rep: Reputation: 809Reputation: 809Reputation: 809Reputation: 809Reputation: 809Reputation: 809Reputation: 809
Which Linux distribution are you using?
Is this a new install?
New install of LAMP?
Did you restart mysqld after granting privileges?
Did you check permissions on the /var/lib/mysql directory and sub-directories?
 
Old 05-06-2011, 04:47 PM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,415

Rep: Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968Reputation: 1968
You're not even going to give us any context whatsover, just paste a bunch of terminal output? No hello, no please, no thank you?

http://dev.mysql.com/doc/
 
0 members found this post helpful.
Old 05-06-2011, 04:54 PM   #4
tanasqui
LQ Newbie
 
Registered: Apr 2011
Location: Johnson City, TN
Distribution: BTr2, Ubuntu 10 & 11
Posts: 5

Original Poster
Rep: Reputation: 0
I apologize, This server is running on Ubuntu 10.10 server, new install of lamp. Restarted after privileges, permissions were not checked, what should they be?
 
  


Reply

Tags
denied, lamp, mysql, php


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
LAMP Server Setup tommytomato Linux - Newbie 1 03-16-2010 10:40 PM
How do I Host a Direct Online??? Ubuntu Server LAMP Setup jsullivan44 Linux - Server 1 09-19-2009 06:06 PM
Remote setup of LAMP server on CentOS 5 satimis Linux - Server 19 02-01-2008 12:42 AM
How can I setup a server (LAMP)? Aziz Linux - Server 1 09-06-2006 07:55 PM
LAMP server setup Wim Sturkenboom Linux - General 3 04-20-2006 02:36 PM


All times are GMT -5. The time now is 06:37 AM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration