MySQL

How to reset root users privileges in MySQL

Hello folks

If you are having problems with MySQL root user privileges, not related with password issues. I can understand your frustration, because you can connect to DB engine, but you can't do anything select/update etc.

Below you can find a short solution.

1. Stop your MySQL service

#/etc/init.d/mysqld stop (UNIX style)

2. Start your MySQL with privileges

#/usr/bin/mysqld_safe  --skip-grant-tables

3. Connect to mysql DB with your root user

How to associate a Taxonomy Term to a bunch of nodes via SQL for Drupal 6

Hello folks

If for some weird reason you need a bulk process to associate a Taxonomy Term to a bunch of nodes, you can use SQL Script listed below

SET @term_id = 100;
INSERT INTO term_node
SELECT nid, @term_id,vid
FROM `node`
WHERE language = 'en'

This script assume you want to assign the term id # 100 and only for nodes with English as language.

Enjoy IT

enzo

How store all queries executed in MySQL in a Table

Hello folks.

If you have the task of debugging a Function, Store Procedure or a Program, maybe you need to store all executed queries to run certain debug. You can do this by configuring your MySQL to store all queries inside a mysql table.

1. Enable log

execute "SET GLOBAL general_log = 'ON';"
    execute "SET GLOBAL log_output = 'TABLE';"

2. Find inside your queries.

 

How to debug a MySQL function

Hello folks

If you are a MySQL Coder with some buggy functions and you need to debug this script inside you DB, but you don't know how do this, check the following approach.

1. Create a log Table

create table log ( id int AUTO_INCREMENT, 
                   timestamp int default 0 , 
                   name varchar(64), 
                   value varchar(255), key(id));

2. Update your function to include the debugging code

QFirebug with Database profiling

Hello folks

After integrate FirePHP in QCubed, I included support for Database Profiling, this option is so useful when you try to debug your queries ran in your ajax elements like panels or Datagrid Data bind functions.

This Profiling support I18N.

This is an example using profiling for a function to answer the event QAutoCompleteTextBoxEvent in a QAutoCompleteTextBox


public function txtProductName_Change($strFormId, $strControlId, $strParameter){

AttachmentSize
QFirebug.patch57.15 KB
QFirebug-IncludePath.patch875 bytes

Adarky

Ad yourself!

A great addition to plain old Ad Blocking, your own user generated ad's in the place of the one's that drive you crazy. A smart social network of ad choosers, more indie ad's. still in beta but is a refrehing change to blank windows.

Custom solution based on OpenX and ZendFramework. Built from scratch using cutting edge technology, Adarky promises to be a one of a kind offering for its users with a unique sense of control over their online ad space.

Golden Opportunities

Golden Opportunities

Golden Opportunities is a reservation system, oritiented to secreataries and logistic roles.

Each reservetion of a room or a saloom for an event, they win points and they could change these point for prizes.

EDUARDO GARCIA

E-mail: 
enzo@anexusit.com

Partner / CTO & Co-Founder
He is a coder by nature, he love the Open Source Movement and He works design solution to involve Open Source with License Software, the best of two worlds in his words.

View enzo's profile on LinkedIn

Syndicate content