Lord of the Rant.
Formerly turtle2472 Join Date: Mar 2005
Location: Upstate South Carolina
|
So I’m wanting to be able to test connections and such from my iPad and am wondering if anyone has an app they use for this? The ability to make DB changes with phpMyAdmin like functions would be nice too. Come to think of it, I didn’t even think to look at that kind of app.
I’m guessing I could build a web page or something for this, but I don’t know how to do that either. Louis L'Amour, “To make democracy work, we must be a nation of participants, not simply observers. One who does not vote has no right to complain.” Visit our archived Minecraft world! | Maybe someday I'll proof read, until then deal with it. |
quote |
Lord of the Rant.
Formerly turtle2472 Join Date: Mar 2005
Location: Upstate South Carolina
|
I think what I'm really looking for is a way to have a hosted php page that can accept inputs for things like mysql server hostname, user, pass and other variables and then actually display the results of the connection attempt so I can troubleshoot connection issues.
While it would be nice to be able to do basic connection testing and minor DB manipulation from my iPad, I'd not do that often enough to matter. Certainly not worth $9 or more for an app on the App Store. To carry this farther, I'm thinking of maybe making it as a docker container that I can set environmental variables to do this! In the end, this is what it is really for. I'm getting into docker now and running into issues connecting to my central DB which isn't hosted in the "docker network" but rather my primary network. Louis L'Amour, “To make democracy work, we must be a nation of participants, not simply observers. One who does not vote has no right to complain.” Visit our archived Minecraft world! | Maybe someday I'll proof read, until then deal with it. |
quote |
Selfish Heathen
Join Date: May 2004
Location: Zone of Pain
|
FWIW, I also used phpMyAdmin like 20 years ago for ad-hoc queries like this when I couldn't get to a proper terminal shell. Assuming it's still maintained, setup is probably still as dumb simple as it was then. You just need to put the DB host/name/credentials into a file on the server that it can read, and it does all the rest. I can't remember if it could just take the connection options as form inputs, but I wouldn't be surprised if it can now. Have you looked at recent versions?
The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting. |
quote |
Lord of the Rant.
Formerly turtle2472 Join Date: Mar 2005
Location: Upstate South Carolina
|
That is possible I suppose. I'm just struggling through the networking and docker right now. I know networking, just learning how docker handles it.
Searching around I found this article that talks about a "simple" php page to test connections. Code:
<?php
# Fill our vars and run on cli
# $ php -f db-connect-test.php
$dbname = 'name';
$dbuser = 'user';
$dbpass = 'pass';
$dbhost = 'host';
$link = mysqli_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'");
mysqli_select_db($link, $dbname) or die("Could not open the db '$dbname'");
$test_query = "SHOW TABLES FROM $dbname";
$result = mysqli_query($link, $test_query);
$tblCnt = 0;
while($tbl = mysqli_fetch_array($result)) {
$tblCnt++;
#echo $tbl[0]."<br />\n";
}
if (!$tblCnt) {
echo "There are no tables<br />\n";
} else {
echo "There are $tblCnt tables<br />\n";
}
?> Thing about this is it requires CLI php and I would like something like this but variables in the docker config so it can be simply updated as needed.Louis L'Amour, “To make democracy work, we must be a nation of participants, not simply observers. One who does not vote has no right to complain.” Visit our archived Minecraft world! | Maybe someday I'll proof read, until then deal with it. |
quote |
Posting Rules | Navigation |
|
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Web Sharing, MySQL, and PHP | King Kovifor | Genius Bar | 8 | 2007-11-25 20:59 |
Best way of using PHP & MySQL within Mac OS X? | MagSafe | Programmer's Nook | 3 | 2007-04-21 20:32 |
MSSQL -> MySQL? | ast3r3x | Programmer's Nook | 2 | 2006-11-02 16:38 |
MySQL in OSX | nassau | Programmer's Nook | 2 | 2005-12-12 12:04 |
MySQL Fun! | ast3r3x | Programmer's Nook | 2 | 2004-07-21 17:08 |