Made a simple application with just a form and a button wich connects to a MariaDB DB and does some simple stuff, all fine
The credentials, DB name, user, password and stuff is all hardcoded as const strings (for now)
The application must be a console one; no big deal: new .dpr/proj file with apptype console and dew moew
But now it fails the connection to the MariaDB, with this message:
... (EUniError): "#42000Access denied for user 'HereTheTestUserName'@'%' to database 'TheDatabaseName"
Notice where it indicates the user name: it's not 'username'@'computername.or.whatever' but instead is 'username'@'%'.
Going back to the GUI app, I change the username to a wrong name, and it will complain with a message as 'wrongusername'@'thiscomputer'
The same action on the console name says 'wrongusername'@'%' without any computername, just the % sign
Please, help: this app must be commandline, and I can't deliver it
Bug connecting to MariaDB (MySQL?) from console application
Re: Bug connecting to MariaDB (MySQL?) from console application
Thank you for your inquiry!
Kindly note that the error message'Access denied for user 'YourUserName'@'YourComputerName'' is returned by the server and suggests that the user authentication has failed: no user with the 'YourUserName' name exists, an invalid password was entered, or a user with the 'YourUserName' name has no access rights to the server from the 'YourComputerName' computer.
To resolve the issue, you need to grant the necessary privileges on the YourUserName account or create a user with such privileges. For more information, see the MySQL reference manual: https://dev.mysql.com/doc/refman/8.0/en/grant.html
Should you have any additional questions please do not hesitate to ask.
Kindly note that the error message'Access denied for user 'YourUserName'@'YourComputerName'' is returned by the server and suggests that the user authentication has failed: no user with the 'YourUserName' name exists, an invalid password was entered, or a user with the 'YourUserName' name has no access rights to the server from the 'YourComputerName' computer.
To resolve the issue, you need to grant the necessary privileges on the YourUserName account or create a user with such privileges. For more information, see the MySQL reference manual: https://dev.mysql.com/doc/refman/8.0/en/grant.html
Should you have any additional questions please do not hesitate to ask.
Re: Bug connecting to MariaDB (MySQL?) from console application
Thank you very much :)
Yes, you're right; in one place I typed a "-" instead of "_", and each time I compared it, I read them equal while it was different
Yes, you're right; in one place I typed a "-" instead of "_", and each time I compared it, I read them equal while it was different
Re: Bug connecting to MariaDB (MySQL?) from console application
We are glad to see the problem resolved. Please don't hesitate to contact us with questions concerning our product usage.