fixerror-blog
fixerror-blog
Fix Error Blog
5 posts
Record about how to fix program and operation system error.
Don't wanna be here? Send us removal request.
fixerror-blog · 12 years ago
Text
Fix MySQL safe update mode error
When I exec `update table_name set column1=value1`, I meet this Error:
“You are using safe update mode and you tried to update a table without a WHERE clause that uses a KEY column.”
How to fix it ?
Close the safe update mode  by exec this sql command:
SET SQL_SAFE_UPDATES=0;
On the other hand, you can restore the setting by this sql command:
SET SQL_SAFE_UPDATES=1;
0 notes
fixerror-blog · 12 years ago
Text
How to set MySQL default charactoer as UTF8 in my.cnf ?
add these settings in /etc/mysql/my.cnf (if your host os is ubuntu12.04):
[client]
default-character-set=utf8 
  [mysql]
default-character-set=utf8 
  [mysqld]
collation-server = utf8_unicode_ci 
init-connect='SET NAMES utf8'
character-set-server = utf8
BTW:
  How can you bring out MySQL’s full power? With High Performance MySQL, you’ll learn advanced techniques for everything from designing schemas, indexes, and queries to tuning your MySQL server, operating system, and hardware to their fullest potential. This guide also teaches you safe and practical ways to scale applications through replication, load balancing, high availability, and failover.
I think it's the best book for you to learn MySQL - High Performance MySQL.
0 notes
fixerror-blog · 12 years ago
Text
Fix Error '29506' when install MS SQL Server Management Stutio x64 on Windows
create a new .cmd file with content:
msiexec /i X:\Your\msi\install\file\path\SQLServer2005_SSMSEE_x64.msi
run this cmd script as Administrator.
Done!
0 notes
fixerror-blog · 12 years ago
Text
HTML content is rendering as String in Tornado templates
I develop with Python Tornado framework and save my post content as HTML code in Database in my application.
But when reading them from database and render on Tornado Template, they will display as string like </p><img href="***"></p> instead of render as formated content.
How to fix it ?
adding {% autoescape None %} in your template directly,
OR
in your Tornado application settings, specify audoescape to None like this:
settings = {"autoescape": None}
  Some refs:
Python Cookbook
Learning Python
Programming Python
Python in a Nutshell
1 note · View note
fixerror-blog · 12 years ago
Text
Fix "Unable to find vcvarsall.bat" on Windows
I found the answer to resolve it from Stackoverflow, here is how to Fix it:
For Windows installations:
While running setup.py for package installations Python 2.7 searches for an installed Visual Studio 2008. You can trick Python to use a newer Visual Studio by setting the correct path in VS90COMNTOOLS environment variable before calling setup.py.
If you have Visual Studio 2010 installed, execute
SET VS90COMNTOOLS=%VS100COMNTOOLS%
or with Visual Studio 2012 installed
SET VS90COMNTOOLS=%VS110COMNTOOLS%
Another way to resolve this problem
I found the solution. I had the exact same problem, and error, installing 'amara'. I had mingw32 installed, but distutils needed to be configured.
I have Python 2.6 that was already installed.
I installed mingw32 toC:\programs\mingw\
Add mingw32's bin directory to your environment variable: appendc:\programs\MinGW\bin;to thePATH
Edit (create if not existing)distutils.cfgfile located atC:\Python26\Lib\distutils\distutils.cfgto be:
[build] compiler=mingw32
Now runeasy_install.exe amara.
Make sure environment is set by opening a newcmd.exe.
Link
0 notes