Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7901781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:19:25+00:00 2026-06-03T09:19:25+00:00

I searched here but did not see an answer . I am using Delphi2010.

  • 0

I searched here but did not see an answer .

I am using Delphi2010.
I using Devart Mydac to connect to mySql data base .
When i set the Server, Database, Name , Pass in the component it connects no problem.

BUt when I try to connect just with code it give an error.

begin
    MyConnection1.Server:='MyServer';
    MyConnection1.Database:='MyDatabase';
    MyConnection1.Username:='MyUserName';
    MyConnection1.Password:='MyPassword';
    MyConnection1.Connected:= True;
    MyQuery1.Active:= True;
end;   

exception class EMySalExcption with message”#28000 Access denied for
user’username@00.00.00.00′(useing passworkd: YES)’.

Why will the code method cause an error ?

Thanks for your help and patience.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T09:19:27+00:00Added an answer on June 3, 2026 at 9:19 am

    I would comment, but I don’t think I have the ability to yet. But I concur with Marco, I am not experienced with this language or product, but I wonder, is the database on a remote machine? First try setting the server to the IP and seeing if that works.

    I found this configuration online and removed a few things to get to the core

    begin
      MyConnection1.LoginPrompt := false;
      MyConnection1.Username := 'test';
      MyConnection1.Password := 'test';
      MyConnection1.Database := 'test';
      MyConnection1.Server := '127.0.0.1';
      MyConnection1.Port := 3306;
      MyConnection1.Connect;
    end;
    

    One thing I noticed is it has a disable for the LoginPrompt, where as you don’t, also it has a port. I would try setting the ip and port number, if that works, then try setting just the port number. If none of that works try the full implementation here and then go backwards in taking things out and setting server back to hostname

    begin
      MyConnection1.Pooling := true;
      MyConnection1.PoolingOptions.MinPoolSize := 1;
      MyConnection1.LoginPrompt := false;
      MyConnection1.Options.Charset := 'utf8';
      MyConnection1.Options.Direct := true;
      MyConnection1.Options.UseUnicode := true;
      MyConnection1.Username := 'test';
      MyConnection1.Password := 'test';
      MyConnection1.Database := 'test';
      MyConnection1.Server := '127.0.0.1';
      MyConnection1.Port := 3306;
      MyConnection1.Connect;
    end;
    

    referenced from http://forums.devart.com/viewtopic.php?t=12035

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I searched the site but did not find the answer I was looking for
I think I searched for an answer about my problem but I did not
Does the standard specify the official C++ grammar? I searched, but did not find
I have searched Google for a converter but I did not find anything. Is
I must be reinventing the wheel here - but I've searched and I can't
I've searched the web and I've searched the questions here on stackoverflow, but I
I searched everywhere but can't find it. So I'm asking it here. I want
Here we go again , searched and tried myself but none of the online
I've searched and found a good discussion here on SO , but it is
I've searched through the other expected Class Name error questions on here, but they

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.