jtrahair
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Connecting to on-line MySQL databaseIt is installed already. I have a new domain which I installed it on.
Forum: Fixing WordPress
In reply to: Connecting to on-line MySQL databaseSo, either I have to write a server-based program in another language, or the client-side VB.net program somehow sends the SQL query to the server and returns the data from the query. I prefer the second one but I’m not sure where to start!
Forum: Fixing WordPress
In reply to: Connecting to on-line MySQL databaseThis is a test procedure which looks up invoice 77 from the table of invoices which II wrote using VB.net. The error happens within the program on the line marked with <<<, ie. connMySQL.Open().
(Assume that all other items are in place and that when my laptop’s IP address is registered with the MySQL database everything works just fine. Obviously, the connection string has been modified for you to see, and that the xxx etc. are replaced by valid and working settings. I never use qwerty as a password!)
Dim strSQL As String = "" Dim connMySQL As New MySqlConnection Dim strResults As String = "" Try 'Set connection string: connMySQL.ConnectionString = "server=160.xxx.xxx.xxx;Port=3306; user id=i1234_wp1; password=qwerty; database=i1234_wp1;" connMySQL.Open() <<<< error happens here. 'Look up a test record, say invoice number 77: Dim cmd As New MySqlCommand cmd.Connection = connMySQL strSQL = "SELECT * FROM Invoices WHERE InvoiceNumberInt = 77 cmd.CommandText = strSQL Dim myData As MySqlDataReader myData = cmd.ExecuteReader If myData.HasRows = 0 Then MsgBox("!") Else While myData.Read 'Display some of the data from invoice 77: strResults = strResults & myData.GetValue(0).GetType.ToString & " " & myData.GetName(0) & " " & myData.GetValue(0) & vbCrLf strResults = strResults & myData.GetValue(1).GetType.ToString & " " & myData.GetName(1) & " " & myData.GetValue(1) & vbCrLf 'etc. strResults = strResults & myData.FieldCount & vbCrLf strResults = strResults & vbCrLf End While End If myData.Close() cmd.Connection.Close() MsgBox(strResults) Catch ex As Exception MsgBox(ex.Message, vbExclamation, mCompanyName) End TryForum: Fixing WordPress
In reply to: Connecting to on-line MySQL databaseExcept that, as an experiment, I deleted my computer’s IP address from cPanel Remote MySQL, and the connection failed, error message:
“Authentication to host ‘160.xxx.xxx.xxx’ for user ‘i1234_wp1’ using method ‘mysql_native_password’ failed with message: Access denied for user ‘i1234_wp1’@’178.zzz.zzz.zzz’ (using password: YES)”On restoring the IP address in Remote MySQL the connection succeeded.
Forum: Fixing WordPress
In reply to: Connecting to on-line MySQL databaseSo, are we saying that the WordPress database doesn’t mind what IP address wants to connect to it, so my Monday morning scenario won’t happen? (See above.)
Forum: Fixing WordPress
In reply to: Connecting to on-line MySQL databaseThank you. I will abandon ‘my’ database and add the new tables, fields and records to ‘i1234_wp1.
Forum: Fixing WordPress
In reply to: Connecting to on-line MySQL databaseThanks, tsure. The MySQL/phpMyAdmin page shows 2 databases – the one I created and a WordPress database eg. i12345_wp1. Both are described as localhost in phpMyAdmin.
The customer will HTTP the server – how would it pass the SQL string and how will it pass back the data returned?
Thanks again.Forum: Fixing WordPress
In reply to: Connecting to on-line MySQL databaseMySQL on-line will only accept connections from IP addresses previously granted. Yes, granting individual access to certain IP addresses is possible. But some users IP addresses aren’t fixed they’re dynamic, meaning they change frequently. I don’t want to be the person my customers ring on Monday mornings when they can’t connect to their own on-line database (‘It’s happened again – fix it!’).
I was told that to overcome this problem I should put a WordPress site between my customers computers and the MySQL database. The WordPress site’s IP address won’t change, and customers can connect to the WordPress site and send SQL strings to MySQL and receive back the data.
My question is, how do I use WordPress as the go-between?
Thanks for your reply, hope this makes sense!Forum: Fixing WordPress
In reply to: Connecting to on-line MySQL databaseWordPress is on a new domain set up and hosted by godaddy.