Execute mysql command from shell

2010-02-04 1 min read Database

phpMyAdmin is a very slow application if you want to execute a query on your database. If you know the name of the database then any GUI tool is an overhead. So I have written a one liner shell script to do that for me 🙂

Here’s the script:

echo ”select * from table where field like ”%$1%””|mysql -h doamin.com -u amit -p -D amit -r –password=hello

When run with one argument it will execute the sql query directly without asking for password also.

Continue reading

phpMyEdit – Mysql table viewer, editor and php code generator.

2009-10-01 1 min read Database Linux

As a developer, whenever you want to write the php code to get the data from the MySQL database, sometimes it becomes tiresome and time taking. And what if you had to do it dynamically. Well I have not generated the code dynamically using <a href="http://www.phpmyedit.org/">phpMyEdit, but I believe that should be pretty much doable.

But what you would definately like this open source php code to view, edit and generate php code, saving you some time to concentrate on better and interesting things. The official website has this description:

Continue reading
Newer posts