Drupal: .htaccess Access Deny
August 21, 2014 – 7:59 am | No Comment

In this article I will tell how to forbid access to certain resources for some clients. The instructions will include descriptions of different directives.

Read the full story »
CSS Templates

Contain reviews and news about CSS Templates.

Freebies

Contain freebies such as icons, graphics, headers and images for your websites.

Fun Stuff

Contains other fun stuff for entertainment or interesting site showcase.

How-To

Contain technical elaborations on some specific workarounds or common tweak.

Joomla Templates

Contains reviews and news about Joomla templates.

Home » How-To

Drupal: How to Run SQL-Request

Submitted by on October 27, 2010 – 7:37 amNo Comment

From here, you can get know how to run SQL-request (snippet) in a few ways. There is no need to read long tutorials!

Precautionary measures: You need to create a backup copy of your database in the following cases:

  • before executing an unknown code
  • before making big changes
  • Just in case :)
Solutions:

You can run SQL-request with the help of:

  • phpMyAdmin (web-interface)
  • mysql program (SSH, command line)

phpMyAdmin (web-interface)

  • If you have a request, you can simply run it. To do this:
    • Select database in phpMyAdmin,
    • Click SQL tab (“Run SQL request(s) on DB”),
    • Insert SQL-request to the appropriate field and
    • Click “Run”
  • You can also make changes in tables and fields of database.

mysql program (SSH, command line)

It is very simple to use mysql. Run this in the command line:

shell> mysql db_name

Or:

shell> mysql –user=user_name –password=your_password db_name

Then enter SQL-request and end it with “;”, \g, or \G. Press Enter.

Note: use man mysql to specify the parameters.

Leave a comment!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.