HelioHost Posted July 12, 2023 Posted July 12, 2023 Username: kaderd, Server: Tommy, Main domain: edt-laval.helioho.stHello, I have a question regarding this issue: I have a Python application that uses MySql database engine, in the source code I Need to submit the connection Information to connect to the Database, in order to let the application work properly. The Database will be shared On helioshost web site (That 's why I signed up) , my question is : The connection information that are defined by your system are : Host localhost:3306 Database name kaderd_xxxxxx User name xxxxxx Password ****** Regarding the host info , I was expecting something like : https://heliohost..../kaderd/xxxx If I enter the host information : localhost:3306 into my code, it will not work, as it will look into my computer for the Database, unless I must copy my application code to you website, wich I don't want to do. I just need to copy the data base onto you website. Can you please let me know how your website works. Thank you. Kader Djimani kaderd@hotmail.com
wolstech Posted July 12, 2023 Posted July 12, 2023 Use tommy2.heliohost.org:3306 as the host name if you're accessing the database remotely. Note that when you create the database user in Plesk, you must specifically enable the user for remote connections, otherwise you'll receive an access denied error.
HelioHost Posted July 13, 2023 Author Posted July 13, 2023 Hi, Actually, I received this error message from my python application : line 366, in _auth_switch_request raise get_exception(packet) mysql.connector.errors.ProgrammingError: 1044 (42000): Access denied for user 'kaderd_kaderd'@'%' to database 'kaderd_EDT_Secure' and these are my credentials submitted to my program in order to connect to the database : def create_connection(self): return mysql.connector.connect( host="tommy2.heliohost.org", port=3306, user="kaderd_kaderd", password="xxxxxxxxxx", database="kaderd_edt_secure" The message says : access denied for user kaderd_kaderd, I'm 100% sure of my user_name et my password. So why the connection is refused ? Thank you for your help Kader Djimani De : HelioHost Support Envoy? : 12 juillet 2023 10:28 ? : kaderd@hotmail.com Objet : Re: [HH#768212] Question Use tommy2.heliohost.org:3306 as the host name if you're accessing the database remotely. Note that when you create the database user in Plesk, you must specifically enable the user for remote connections, otherwise you'll receive an access denied error. You may view the status of your ticket by visiting: https://helionet.org/index/index.php?showtopic=56442 Thank you, Heliohost support https://heliohost.org/ https://helionet.org/
wolstech Posted July 13, 2023 Posted July 13, 2023 Assuming the credentials are correct, this occurs when you didn't enable remote access for the MySQL user. If you edit the database user in plesk, there is an option to enable remote access for the user. This needs to be turned on in order for remote connections to work using that database user.
Recommended Posts