BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
avinashaecwb
Obsidian | Level 7

Hi

 

I have SAS/ACCESS ODBC licence through which I am trying to connect to MySQL database. name of the database is "repairsdb". I have below entry created in my obbc.ini file:

 

[SOLVUP]
Driver = OracleODBC-10g
Server = 10.1.8.138
DATABASE = repairsdb
Port = 3306
UID = repairsdbuser
Password = repairspw

 

When I try to create a access it using LIBNAME statement with dsn=SOLVUP User= repairsdbuser pwd =repairspw, it throws error "do not have access rights to repairsdbuser@localhost"(PASSWORD USE =YES). 

 

If i remove the Pwd parameter, LIBNAME is successfully assigned but when I try to access any table in data set, I get an error "no database selected" .

 

Could you please suggest how to make a successful connection ?

 

Regards

Avinash

1 ACCEPTED SOLUTION

Accepted Solutions
avinashaecwb
Obsidian | Level 7

This is fixed now. I modified the odbcisnt.ini and odbc.ini files at etc and /opt/sas/SASHome/SASODBCDriversfortheWebInfrastructurePlatformDataServer/9.4/Driver . Also, added envionment variables in file sasenv_local .

View solution in original post

4 REPLIES 4
Kalind_Patel
Lapis Lazuli | Level 10

first of all,

this line " Driver = OracleODBC-10g"

 

confusing me in odbc.ini file,

are you sure you have configured proper driver information in odbcinst.ini and odbc.ini files ?

 

because for MySQL driver, you have mentioned OracleODBC-10g.

avinashaecwb
Obsidian | Level 7

@Kalind_Patel Hi.. that was when I was trying different solutions. I also tried keeping Driver = MySQL . it still gavce same errors.

Kalind_Patel
Lapis Lazuli | Level 10

thanks for the clarification,

 

it looks like that you need some additional permission from MySQL database,

 

You can try to connect with mysql command in linux,

I'm sure it will give you the same error,

 

 

In MySQL,

try to tun this command :

SHOW GRANTS FOR 'repairsdbuser'@'localhost';

 

and check what permission you are missing,

Sometimes we have to additionaly grant privilages to users like repairsdbuser@localhost

 

Your MySQL DBA can help you on this issue.

avinashaecwb
Obsidian | Level 7

This is fixed now. I modified the odbcisnt.ini and odbc.ini files at etc and /opt/sas/SASHome/SASODBCDriversfortheWebInfrastructurePlatformDataServer/9.4/Driver . Also, added envionment variables in file sasenv_local .

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 4 replies
  • 1346 views
  • 0 likes
  • 2 in conversation