开发者

Editing MySql database records

I have a MySQL database located on my webserver that I frequently need to add records. What is an easy way to add/edit/delete records without having to login to my control panel, t开发者_如何转开发hen login in to phpMyAdmin?

Also, If I could find a way for multiple users to add records, It would save me a lot of time from having to import lots of csv files.

An Android App for my Galazy Tab would be epic.


Adminer is probably what you're looking for; it's a single PHP file you upload to your server. You just log in to the database (it'll save details for you), and off you got. Think PHPMyAdmin, but not as bloated.

It'll obviously work on your Galaxy Tab (jealous rant ensues; I want one!), as it's web based. It's also themable, if you're into that kind of thing.


There is an official MySQL GUI Query Browser/Administrator/Database Designer application that can be downloaded from here. To use this you need to make sure that your server is configured to allow your MySQL user account to log in from a remote IP address.


Aside from writing your own webapp to do that (easily done in php for example) you could install phpMyAdmin in webspace. phpMyadmin is simply a php based web application that is typically installed in control panel, but there is nothing preventing you from setting up and configuring your own copy.

With that said, and considering your desire to use your phone -- a really simplified form might be the best solution for you.


You can create csv file with columns like in your db and use LOAD DATA INFILE ... See http://dev.mysql.com/doc/refman/5.1/en/load-data.html.

But anyway you should have script maybe php which will get run this command for a specific file.


You can create some simple web services in PHP. Just a script that receives an HTTP GET, and forms a SQL query out of that.

You can then create a android application consisting of one form (activity). The submit button on that form can send an HTTP GET request to your PHP web service and create a database record based on your form.

This is a good, beginner project. Just a couple hundred lines of code. When you start building it, post more specific questions, and someone will help you...

Sample PHP web service:

<?php
include "Utility/connect.php"; 
connect();   

$type = mysql_real_escape_string($_GET['form_field_1']);
$body =  mysql_real_escape_string($_GET['form_field_body']);
$date = time();


//Create Entry in database
$createNode = "INSERT INTO my_form(date, body, subject) VALUES('$date', '$Body',$subject,)";
mysql_query($createNode) or die(mysql_error());




?>


What I would use is HeidiSQL as it allows MYSQL connections over SSH (you just tunnel your MYSQL traffic over). No need to open mysql to the world, and you have a very powerful easy to use client at your fingertips. Stop using phpmyadmin on your server, use HeidiSQL.

Here is the link http://www.heidisql.com/

later get plink.exe (for tunnel) and off you go, its a simple process to setup.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜