Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 02-06-2006, 06:32 PM   #1 (permalink)
revolution
Legend in my own mind
 
revolution's Avatar
 
Join Date: May 2002
Location: florida
Posts: 618
revolution is on a distinguished road
Send a message via AIM to revolution
help with no connection allowed mysql

i keep getting this error on a new dedicated server with mysql

Code:
mysql_connect(): Host 'localhost.localdomain' is not allowed to connect to this MySQL server

can anyone give me a clue on how to fix that. Ive tried editing /etc/hosts and the error just changes depending on what is changed. I
__________________
Is it me or does the word abbreviation seem a little long?


registered user #193524 with the Linux Counter,
http://counter.li.org
revolution is offline   Reply With Quote
Old 02-06-2006, 09:46 PM   #2 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,532
sde is on a distinguished road
wow look who it is long time no see!

have you logged into mysql as root and tried a grant statement for the user?
Code:
$ mysql -uroot -pmypass
> GRANT ALL PRIVILEGES ON *.* TO myuser@localhost.localdomain IDENTIFIED BY 'somepass';
> exit;
sde is offline   Reply With Quote
Old 02-07-2006, 09:40 AM   #3 (permalink)
DJMaze
Senior Contributor
 
DJMaze's Avatar
 
Join Date: Mar 2005
Posts: 746
DJMaze is on a distinguished road
I do hope you're using MySQL 4.0.x else you need to screw around with OLD_PASSWORD or something
DJMaze is online now   Reply With Quote
Old 02-10-2006, 02:37 AM   #4 (permalink)
revolution
Legend in my own mind
 
revolution's Avatar
 
Join Date: May 2002
Location: florida
Posts: 618
revolution is on a distinguished road
Send a message via AIM to revolution
thanks SDE, that worked, although i may have screwed something up, im not sure what it is, but something just doesnt feel right.

Glad to see everyone again
__________________
Is it me or does the word abbreviation seem a little long?


registered user #193524 with the Linux Counter,
http://counter.li.org
revolution is offline   Reply With Quote
Old 02-10-2006, 08:43 AM   #5 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,532
sde is on a distinguished road
You just need to use that with whatever user and hostname you're from. usually it would just be 'localhost' instead of 'localdomain.localhost', but if you were getting an error like that, then mysql is recognizing the long hostname first.
sde is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with outside connection to mysql using a php page ericanca PHP 11 07-19-2005 11:33 AM
Help with outside connection to mysql using a php page ericanca Everything SQL ( MySQL, MSSQL, DB2, Postgre, Oracle, etc...) 1 04-18-2005 08:37 PM
DAO wrapper class for Connection Pooling using JNDI Mazzman Java 4 03-29-2005 08:54 AM
and on to mysql .. sde Linux / BSD / OS X 2 01-18-2003 08:39 PM


All times are GMT -8. The time now is 12:38 AM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0 RC8 ©2007, Crawlability, Inc.





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting