LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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
 
LinkBack Search this Thread
Old 05-06-2011, 03: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, 03:46 PM   #2
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,139

Rep: Reputation: 622Reputation: 622Reputation: 622Reputation: 622Reputation: 622Reputation: 622
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, 03:47 PM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,345

Rep: Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945Reputation: 1945
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, 03: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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LAMP Server Setup tommytomato Linux - Newbie 1 03-16-2010 09:40 PM
How do I Host a Direct Online??? Ubuntu Server LAMP Setup jsullivan44 Linux - Server 1 09-19-2009 05:06 PM
Remote setup of LAMP server on CentOS 5 satimis Linux - Server 19 01-31-2008 11:42 PM
How can I setup a server (LAMP)? Aziz Linux - Server 1 09-06-2006 06:55 PM
LAMP server setup Wim Sturkenboom Linux - General 3 04-20-2006 01:36 PM


All times are GMT -5. The time now is 03:04 PM.

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