List:General Discussion« Previous MessageNext Message »
From:Gleb Paharenko Date:February 27 2005 2:23pm
Subject:Re: Access Denied For User
View as plain text  
Hello.

I successufully connected to MySQL server using your parameters
in odbc.ini and odbcinst.ini files from php. 

> [unixODBC][MySQL][ODBC 3.51 Driver]Access denied for user:
> 'apacheusr@localhost' (Using password: NO)

You have specified the user and the password in the ODBC configuration
files, but your scripts don't use them. I think the problem is in your
connection string which you are specifying in the odbc_connect().




"Dan Wareham" <danwarehamuk@stripped> wrote:
> Hello,
> 
> I have a Linux server running Apache, MySQL, unixODBC, MyODBC
> 
> In my odbcinst.ini file I have the following:
> 
> [MySQL]
> Description    = ODBC for MySQL
> Driver         = /usr/local/lib/libmyodbc3.so
> FileUsage      = 1
> 
> I have setup the following system DSN in the odbc.ini file:
> 
> [PbDatabase]
> Description = System DSN
> Driver = /usr/local/lib/libmyodbc3.so
> Host = localhost
> Server = localhost
> User = username
> Password = password
> Port = 3306
> Database = Database01
> Option = 3
> 
> However, when I use the System DSN name in my scripts I get the following 
> error:
> 
> 350
> Native SQL Error Code
> [unixODBC][MySQL][ODBC 3.51 Driver]Access denied for user: 
> 'apacheusr@localhost' (Using password: NO)
> 
> The user apacheusr is the username that the Apache webserver is running 
> under. I've tried adding this user to the MySQL user table but the error 
> still shows.
> 
> However, if I add the Username and Password along with the DSN name to my 
> scripts within my HTML pages then the connection is made and records from 
> the database returned.
> 
> Any ideas why this might be happening?? Is it a permissions issue with MySQL 
> or with unixODBC or Apache??
> 
> Any help would be greatly appreciated.
> Thanks in advance
> D@n
> 
> 
> 
> 
> 


-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   Gleb.Paharenko@stripped
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
       <___/   www.mysql.com



Thread
Access Denied For UserDan Wareham24 Feb
  • Re: Access Denied For UserGleb Paharenko28 Feb