TXT
MySQL
How to reset root users privileges in MySQL
Submitted by enzo on Mié, 02/02/2011 - 19:22Hello 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
Submitted by enzo on Jue, 01/20/2011 - 16:31Hello 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
Submitted by enzo on Mar, 12/14/2010 - 21:51Hello 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
Submitted by enzo on Mar, 12/14/2010 - 18:15Hello 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
Submitted by enzo on Lun, 03/16/2009 - 04:13Hello 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){
| Adjunto | Tamaño |
|---|---|
| QFirebug.patch | 57.15 KB |
| QFirebug-IncludePath.patch | 875 bytes |

