Connecting to external MySQL DB from a web server not running MySQL

While I've been working with MySQL for years, this is the first time I've run across this very newbie-esq issue. Due to a client demand, I must host their website files (PHP) on a IIS server that is not running MySQL (instead, they are running MSSQL). However, I have developed the site using a MySQL database which is located on an external host (Rackspace Cloud). Obviously, my mysql_connect function is now bombing because MySQL is not running on localhost.

Question: Is it even possible to hit an external MySQL database if localhost is not running MySQL

Apologies for the rookie question, and many thanks in advance.

* To clarify, I know how to connect to a remote MySQL server, but it is the fact that my IIS web server is not running ANY form of MySQL (neither server nor client) that is giving me trouble. Put another way, phpinfo() does not return anything about MySQL. Additionally, I do not have access to that IIS web server other than FTP *

Posted On: Monday 29th of October 2012 05:41:10 AM Total Views:  436
View Complete with Replies

Related Messages:

data base connecting   (203 Views)
please solve my problem. How to connect my database (pankaj which have multiple column) in mysql server.
Regarding connectin string and connecting to the database   (263 Views)
i am a .net developer and for one of my projects i am using my sql as the database and c# as programming language and it is a windows application so could any one let me know the steps to connect to the mysql database and what all tools (3 rd party tools if any are needed) and also let me the proper connection string syntax for that.
Mysql from external only accessible once?   (259 Views)
, I got a strange problem and would be grateful if someone could give me some pointers on how I can find out what is the problem here. Now here is it: I got a centralized mySQL server which is accessed by an external server. Now the problem I have is that there is always only one query giving a return and all queries after the first query dont give any results, no error message, nothing. So basically simply after the first request obviously the external server doesnt get another mysql connection to the central mysql server. Now I guess that probably got something to do with the setup/my.cnf of my centralized mysql. This is just a guess of mine, but I simply dont know what could be the setting that is causing that. I tried with different queries and while all of the working when being the first query in the script all of them as well wont be working, giving just an empty result, when not being the first query in the script... Could be a timeout issue probably as well on the db-choice I believe I mean I use mysql_connect in order to connect to mysql db and then only once choose the DB but then I guess this should last, even if there is sometimes like 2 min between the first and the 2nd query of the script, or does there exist such a timeout thing
Problem connecting to a database   (207 Views)
Ok, so I already know that I will get a bunch of people telling me not to use DW in the replies, but the problem is I am a newbie to MySQL and I NEED DW to help me with all the coding to create pages that interact with the database. So not using DW is not an option. Ok, down to the problem............. I have defined the site, created all the connection etc in DW. Connecting to the server via FTP in DW works just fine, so connecting to the server is not the problem. When trying to connect to the database, I get the error: MySQL Error#:1045 Access denied for user: '' (Using password: YES) I think I know what the problem is. As you can see above, it says it is trying to connect using the user The problem is the site I am connecting to is, not I have the correct information in the database connection. is actually the host for this site, but it's not the site I am connecting to. So my question is, is DW doing something, or is there something happening on the server that is trying to connect to the host domain instead of the domain I'm trying to connect to I think it is the latter, but I am wondering if that is correct, does anyone know what to do to fix it on the server. If I just take this same question to the host, I guarantee they're not going to know how to fix it. I really need someone who knows what this is so I can go to the host and say this is the problem, and this is what needs to be fixed. So if anyone has any idea how to resolve this issue, I would really appreciate the help. Since I don't know how to make pages to interact with the database not using DW, so finishing the site is dependent of getting this working.
problems connecting to mysql (was "Help! What did I miss out?")   (229 Views)
am a newbie to the 'bolts & nuts' of websites, so I guess this is one of the beginnings to challenges ahead. After reading around the forums for a couple of days for similar problem I got more confused and do not have a clue where to start.... I decided to change my webhost, so I downloaded my files and mysql database to my pc (my first time) following step-by-step instructions from cPanel - thought it looked simple but apparently its not..... After uploading the files and mysql database to the new webhost, the following msg displayed - Warning: mysql_connect(): Access denied for user: 'asian_user@localhost' (Using password: YES) in /home/diva/public_html/ on line 10 Connection Failed in my browser. I then compared info on the cPanels and found that SQL disk usage is 0.01mb & disk usage is 5.82mb in the new webhost whilst SQL usage is 0.18mb & disk usage is 2.44mb in the old one , so something is not correctly done. I would really appreciate advice/help from the experts in this forum,
data base connecting   (229 Views)
please solve my problem. How to connect my database (pankaj which have multiple column) in mysql server.
connect a database with externals tables (remote databases)   (210 Views)
I have a database (MySQL) and I need data from n databases (probably multiples DBMS). For example, if a person is added as an user in other database i need to update my table with the new name. The data is critical, and for sure, i only would have access to read. My database is the only that need to be updated with the new data. the alternatives that I found: *Forget all the text above, and simply generate tokens that are distributed to the organizations, that give a token for each user. *The other sites have (or will build) an API to access the information externally. *Sync databases (here, i need help about the structure to do that)
Querying an external database?   (227 Views)
I have a really simple (but possibly silly question!). If a person has php installed on their webserver, but no MySQL database I can allow that user external access the MySQL database on the external host and run queries back to their webserver right and output that data back on their site on a webpage Also would there be any major problems here in the time the queries take to process
connecting to mysql database with a php script   (299 Views)
Hi everybody, I'm a beginner to php I'm trying to connect to my mysql database but I keep getting a this error: "Fatal error: Call to undefined function mysqli_connect() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\connect\index.php on line 2" I'm not sure exactly whats wrong the code i've been using is "$link = mysqli_connect('localhost', 'root', 'password');"
Install MySQL on a external HD   (122 Views)
I have an external Hard Drive that I would like to create as a roaming database of images. So, I could hook it up to any machine in our office or remotely. This idea might sound ridiculous, but here it goes. Can I install all the necessary things (ie MySQL, Apache, PHP) to create a database and a web application to modify (insert, edit, delete the images and additional information associated to the images) If this is possible, would I need to install an OS too
Having trouble connecting to a MySQL db   (389 Views)
I've been given the connection details for a mysql database from a client but am having no luck connecting to it- when I try to connect from a PHP script simply nothing happens and when I try from a GUI on my computer I get a 'connection failed'. Are there any common causes for this sort of thing that I should be aware of Or do I need to get in touch with the database administrator I don't want to make any stupid requests before trying the obvious solutions!
Problem connecting to mysql through terminal and through mamp   (354 Views)
Can anyone help I don't have much experience of solving this kind of issue. I can no longer connect to mysql through mamp - the light remains red (the apache light is green). In the past typing 'killall -9 mysqld' has done the trick and I have been able to connect to mysql through mamp afterwards. In addition, I am now also unable to connect to mysql through the terminal window. I get the error message ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/Applications/MAMP/tmp/mysql/mysql.sock' (2) The only changes I've made have been to the file in the folder phpMyAdmin, as instructed on page 315 of 'Build your own database driven web site'. (I reverted my changes back but I still get this error message.) Any ideas how I can connect to the database again and get mamp working
trouble connecting   (218 Views)
Im trying to connect to my database, but cant, so I put this echo in there \ PHP Code: $conn=mysql_connect($dbhost,$dbuser,$dbpass)ordie('Errorconnectingtomysql');mysql_select_db($dbname)ordie('Errorconnectingtodb');echo$conn; And I get this, any idea what it means Resource id #4
How to insert record from C into mysql table??   (421 Views)
Welcome and thank you very much in advance for your help, I am writing a program in C (vc6), which records the user. It connects to a MySQL table and then to record the user's name and age. - the problem is - I do not know how to put a C language data in the table, because in this way does not work: >> if (mysql_query (& mysql, "INSERT INTO Login (name, old) values (, s.old))) - if (, s.old) is only a number or word, it's simple and works. But here is the C language VARIABLES and how these variables to insert into mysql table - example, they describe the structures, but it is not necessary. User data and can record directly to a table, in addition to structures. #include #include #include #include #include MYSQL mysql; MYSQL_RES *res; MYSQL_ROW row; void die(void){ printf("%s\n", mysql_error(&mysql)); exit(0); } void main(void){ //============================ register user ================= struct user { char name[20]; char old[20]; } s; printf("hi what is your name\n"); scanf("%s",; printf("How old are you\n"); scanf("%s",s.old); //======================================================= unsigned int i = 0; if (!mysql_init(&mysql)) abort(); if (!(mysql_real_connect(&mysql,"localhost","root","pass","base", 3306, NULL, 0))) die(); if (mysql_select_db(&mysql,"base")) die(); //===================== problem here - how insert in LOGIN table user info ======== if (mysql_query(&mysql,"insert into LOGIN (name,old) values (, s.old)")) // die(); //==================================================================== if (mysql_query(&mysql,"SELECT * FROM LOGIN")) die(); if (!(res = mysql_store_result (&mysql))) die(); while((row = mysql_fetch_row(res))){ for (i=0; i < mysql_num_fields(res); i++) printf("%s\t",row[i]); printf("\n"); } if (!mysql_eof(res)) die(); mysql_free_result(res); system ("pause"); mysql_close(&mysql); } Do you have any ideas in many places looking for this and there is no ... Thank you very much! Ronald.
My mysql is case sensitive :S   (209 Views)
Hi , I was always under the impression that a mysql varchar field is case in-sensitive, however when a user tries to log into my site, if the cases do not match what is in the database exactly it doesn't let them log in. Im trying to get it so that if a user registers with "User" they can log in whether they use "User", "user", "USER", "UsEr" etc... I know this is a mysql forum however if it helps i have included my php code: PHP Code: $query=mysql_query("SELECT*FROMusersWHEREusername='$username'"); $row=mysql_fetch_assoc($query); $db_username=$row['username']; if($username!=$db_username) { echo"Incorrectusername!"; } Could anybody please tell me why this is happening or suggest a possible solution
Best way to store info in mysql   (316 Views)
i have two tables; one with all the users info one with all the course info how best would it be to link what users are assigned to what course purely in terms of design as i know what fields i need etc.. is it better to keep the courses linked to the users in the users table or courses tables or different table
Any mysql functions to increment a value?   (210 Views)
I have an integer in a table I would like to increment. Instead of entering a transaction, is there a mysql call that will handle the locking, reading, incrementing, and updating the value for me magically Or, am I stuck doing a transaction IF I have to do a transaction, please correct me if there is a better or more efficient way to do this. PHP Code: mysql_query("setautocommit=0"); mysql_query("starttransaction"); mysql_query("selectblahfromfoowhere.."); $blahval++; mysql_query("updatefoosetblah=blahvalwhere.."); mysql_query("commit"); mysql_query("setautocommit=1"); I did some research on the mysql site, but reading their code examples is like reading Chinese.
High bandwidth usage between web dedicated server and mysql dedicated server !   (248 Views)
I think your best bet would be the slow-query-log. If a query is returning a lot of data I there might be a chance that it also turns up in the slow-query-log. Otherwise I would suggest that you try to find queries with no WHERE or LIMIT clause, since it sounds like there are a couple of queries in the application that retrieves a lot of data from the database and then just discards it in the PHP code. Or it is simply that your application aggregates data like for example produces reports etc, which means that it reads much more data than what it returns. Either way you have some digging to do. Good luck!
Please solve this mysql query - It's urgent   (239 Views)
Guys i have three tables in my database. 1.x_masterlistofcourses 2.x_masterlistofpapers.3.x_masterlistofocuments x_masterlistofcourses structure: course_id course_name course_description x_masterlistofpapers structure: paper_id paper_no paper_name course_id paper_description dbase x_masterlistofdocuments structure: document_id paper_id paper_no document_name document_filename document_description In my front page I'm showing course name and description. The paper details for every course is stored in x_masterlistofpapers table. The documents for this papers is stored in x_masterlistofdocuments table. Now i want to get document name document description details details from database based on course_id and paper_id. Please any one solve my error. It is urgent. I written query as "select * from x_masterlistofdocuments d,x_masterlistofpapers p where p.course_id="+course_id+" group by d.paper_id=p.paper_id" What is wrong in my query. Bunch of
Left Join query not working in mysql 5.1   (210 Views)
Please see this: Code: WARNING [1024] Error while executing query: select event_type, EventId, VenueId, Price, Schedule, ev.startDate, ev.endDate, eventname, moviename from `eventvenue` ev, `events` left join (movies) on (movies.ID = ev.EventId) where events.ID = ev.EventId and VenueId = '493' and ((ev.startDate >= '2010-04-25' or ev.endDate >= '2010-04-25') or event_type = 'movies') order by moviename asc, ev.startDate asc 1054:Unknown column 'ev.EventId' in 'on clause' This query was working fine in mysql 4.1, but not in mysql 5.1. Can anyone please give me any pointers Thank you for your time!