glenn_boy13 Posted February 9, 2013 Posted February 9, 2013 hi guys, I've been wondering why can't I connect my program to remote mysql?I know already about the "%" thing. I've already added that % in my access host. My program is fully working, it can connect to my localhost database, and last year, I successfully connected my program to any hosting sites that allows remote-mysql. here is my code:MySqlConnection.ConnectionString = "database=1269017_rafdb;server=fdb4.awardspace.com;port=3306;user id=1269017_rafdb;password=0q0EVEBGNG" note: sorry I have to remove the code tags, code is getting messy if it is inserted between code tags. do I have to add port? my url in my homepage is: "http://stevie.heliohost.org:2082/frontend/x3/index.html"so I guess my server would be stevie.heliohost.org and port is 2082 (just a guess).is my server correct? please! looking forward to your answer..I already tried many hosting sites, and none of them works!
Krydos Posted February 9, 2013 Posted February 9, 2013 Port 2082 is cPanel. If you want to connect to MySQL you need to use the MySQL port which is 3306.
glenn_boy13 Posted February 11, 2013 Author Posted February 11, 2013 hi admin, thanks for the reply. yes, I already tried with or without port=3306.I tried connecting my "TESTER" program to connect to helionet remote mysql. here, I attached a screenshot of the error. and here is my code: Server=stevie.heliohost.org;User Id=rafdeato_111;Password=0q0EVEBGNG;Database=rafdeato_db;Port=3306 of course this program is 100% working! I tried connecting it to my localhost.please help.
Krydos Posted February 11, 2013 Posted February 11, 2013 First of all, you might not want to post your password... I'd edit your post for you, but it's in the screenshot too.
Krydos Posted February 11, 2013 Posted February 11, 2013 Naw, stevie.heliohost.org should be fine for the server. Either one should work though. Does the user rafdeato_111 have access and permissions on the database rafdeato_db?
glenn_boy13 Posted February 11, 2013 Author Posted February 11, 2013 admin, its okay. That's not my main database.Sir Shinryuu, I already tried that. still : Access denied for user 'rafdeato_111'@'%' to database 'rafdeato_db'sigh, any hosting site outputs the same error. I really did successfully connect my program to a remote mysql LAST YEAR! but now, ughhh, I don't know what is happening. . sir krydos, hmmm, last year, someone told me to add "%" to allow any ip address to access the database. and I already did that in heliohost. In Remote Database Access Hosts CPANEL I added this -> "%" to access host. Perhaps since you are an admin here, could you open my account and check for the necessary settings? I know successful connection is at hand When I try other hosting sites, the program says unable to conenct to host.
Krydos Posted February 11, 2013 Posted February 11, 2013 Does the user rafdeato_111 have access and permissions on the database rafdeato_db?
Shinryuu Posted February 11, 2013 Posted February 11, 2013 Does the user rafdeato_111 have access and permissions on the database rafdeato_db? In other words, check: http://stevie.heliohost.org:2082/frontend/x3/sql/index.html Under "Current Databases" does the row with rafdeato_db have the rafdeato_111 user associated with it?
glenn_boy13 Posted February 11, 2013 Author Posted February 11, 2013 omg. no. it has no user. and how am I suppose to add the users into such database name?
Krydos Posted February 11, 2013 Posted February 11, 2013 If you click Shinryuu's link there is a section towards the bottom of the page titled "Add User To Database". Creating a user and creating a database isn't enough. You must also grant permissions to that new user on the database before they will be able to access it. And you might also want to make sure you change your password for that user while you're at it.
glenn_boy13 Posted February 11, 2013 Author Posted February 11, 2013 last question: how to add permissions ?
Krydos Posted February 11, 2013 Posted February 11, 2013 After you click "Add" when adding the user to the database a bunch of permissions are listed and you put a check box next to each one that account will need. It's recommended for security reasons to only give the minimum permissions that each user will need.
glenn_boy13 Posted February 11, 2013 Author Posted February 11, 2013 oops! thanks admin!!! darn! THANKS! Before I saw your last reply, I already found the way to add users to a database! THANK YOU SO MUCH to you two! thanks thanks. This heliohost is great. Fast and free. thanksss. God Bless
Shinryuu Posted February 11, 2013 Posted February 11, 2013 Glad your question got answered! Please spare a few minutes to take our brief survey:http://feedback.heliohost.org/Your participation in this survey is greatly appreciated.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now