Installing Apache, MySQL, PHP in Gentoo Server


Hits: 9117  

All commands are performed as root to install Apache, MySQL, PHP and phpMyAdmin in Gentoo Linux Server.

1. Update your System

# emerge –sync

2. Install Apache Webserver

# emerge apache

The web server ROOT is in /var/www/localhost/htdocs/

# /etc/init.d/apache2 start

Then go to http://server-ip/
it works on gentoo

Add apache2 to the startup script
# rc-update -v add apache2 default

3. Install MySQL Database

# emerge mysql

Install MySQL database
# /usr/bin/mysql_install_db

Start MySQL Server
# /etc/init.d/mysql start

Change MySQL User Password
# /usr/bin/mysqladmin -u root -h localhost password ‘new-password’

Test MySQL Server
# /etc/init.d/mysql restart

Add MySQL to the startup script
# rc-update -v add mysql default

4. Install the PHP with modules

# USE=”cli cgi apache2 xml mysql mysqli” emerge ‘dev-lang/php’

Before you can use PHP with Apache… Edit /etc/conf.d/apache2 and add “-D PHP5″ to APACHE2_OPTS

It looks like
APACHE2_OPTS=”-D DEFAULT_VHOST -D INFO -D LANGUAGE -D SSL -D SSL_DEFAULT_VHOST -D PHP5″

You can find php.ini in /etc/php/apache2-php5.4

then restart apache server
# /etc/init.d/apache2 restart

Then go to http://server-ip/info.php (Create phpinfo() file)

phpinfo on gentoo
phpinfo on Gentoo

phpinfo php

phpinfo mysql

5. Install phpMyAdmin

# emerge -av phpmyadmin

Then go to http://server-ip/phpmyadmin/

phpMyAdmin on gentoo
phpMyAdmin on Gentoo

Install Airtime – open source radio automation software


Hits: 7890  

Airtime is open source radio automation software (GPL v3) for GNU/Linux platforms. It’s recommend installing on Ubuntu Linux 12.04 LTS or Debian Squeeze on a computer with at least a 1 GHz processor and 512 MB of RAM for a Server Edition OS or 1GB of RAM for a Desktop Edition OS.

Download airtime-easy-setup

$ sudo wget http://apt.sourcefabric.org/misc/airtime-easy-setup.deb
$ sudo apt-get install gdebi

$ sudo gdebi airtime-easy-setup.deb

Airtime-Icecast
Airtime-Icecast

Unpacking airtime-easy-setup (from airtime-easy-setup.deb) …
Setting up airtime-easy-setup (2.3.0-1) …
Installing Sourcefabric package signing key…
OK
Setting up Airtime for Etc/UTC timezone…
Setting Icecast and Airtime domain names to ip-10-xxx-yy-74.ec2.internal…
Setting defaults for non-interactive installation…
Checking that the server has a UTF-8 locale…
en_US.UTF-8 is the default locale on this server and appears to support UTF-8 encoding.

Now please run the commands:

sudo apt-get update
sudo apt-get install airtime

After that, installation of Airtime should be complete in a couple of minutes.

You should then be able to log in to Airtime at http://ip-10-xxx-yy-74.ec2.internal/
Processing triggers for man-db …

Install Airtime

$ sudo apt-get update
$ sudo apt-get install airtime

*** Verifying your system environment, running airtime-check-system ***
AIRTIME_STATUS_URL = http://ip-10-xxx-yy-74.ec2.internal:80/api/status/format/json/api_key/%%api_key%%
AIRTIME_SERVER_RESPONDING = OK
KERNEL_VERSION = 3.5.0-21-generic
MACHINE_ARCHITECTURE = x86_64
TOTAL_MEMORY_MBYTES = 604072
TOTAL_SWAP_MBYTES = 0
AIRTIME_VERSION = 2.3.0
OS = Ubuntu 12.10 x86_64
CPU = Intel(R) Xeon(R) CPU E5430 @ 2.66GHz
WEB_SERVER = Apache/2.2.22 (Ubuntu)
PLAYOUT_ENGINE_PROCESS_ID = 19766
PLAYOUT_ENGINE_RUNNING_SECONDS = 32
PLAYOUT_ENGINE_MEM_PERC = 2.6%
PLAYOUT_ENGINE_CPU_PERC = 0.9%
LIQUIDSOAP_PROCESS_ID = 19801
LIQUIDSOAP_RUNNING_SECONDS = 31
LIQUIDSOAP_MEM_PERC = 3.4%
LIQUIDSOAP_CPU_PERC = 7.9%
MEDIA_MONITOR_PROCESS_ID = 19701
MEDIA_MONITOR_RUNNING_SECONDS = 38
MEDIA_MONITOR_MEM_PERC = 2.4%
MEDIA_MONITOR_CPU_PERC = 0.0%
RABBITMQ_PROCESS_ID = 16705
RABBITMQ_RUNNING_SECONDS = 427
RABBITMQ_MEM_PERC = 4.8%
RABBITMQ_CPU_PERC = 0.9%
— Your installation of Airtime looks OK!

******************************* Install Complete *******************************
Setting up liquidsoap-plugin-faad (1.0.1+repack1-1) …
Processing triggers for libc-bin …
ldconfig deferred processing now taking place

Airtime
Airtime

Help: http://en.flossmanuals.net/airtime-en-2-3/easy-setup/

Best PHP Encryption Decryption


Hits: 5657  

I was working on Secured & Expired MP3 Link in HTML5 MP3 Player. Hope you already read previous article “Amazon S3 Expiring Link”

You can use below code for hiding real mp3 link inside html source using base64_encode, mcrypt_encrypt, base64_decode, mcrypt_decrypt and md5.

This function is also useful when you need to secure & expire media links …

Remote Secure Token
Secure Token Plugin with PHP
JavaScript Encryption Library

<?php

function encryptDecrypt($key, $string, $decrypt)
{
    if($decrypt)
    {
        
        $string = str_replace("|", "/", $string);
        
        $decrypted = rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, md5($key), base64_decode($string), MCRYPT_MODE_CBC, md5(md5($key))), "12");
        return $decrypted;
    }else{
        $encrypted = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($key), $string, MCRYPT_MODE_CBC, md5(md5($key))));        
        
        $stripping = true;
        while ($stripping){
         if(substr($encrypted, -1) == "="){
         $encrypted = substr($encrypted, 0, strlen($encrypted)-1);
        } else {
         $stripping = false;
        }
        }
        return str_replace("/", "|", $encrypted);
    }
}


$echo = encryptDecrypt("123", "http://www.svnlabs.com/mp3/svnlabs1.mp3", 0);
echo $echo."<br>";
echo encryptDecrypt("123", $echo, 1);

?>

 

Output:
yTWxdWnzTqh2OHxrfVX5Xxa+K8vGso9|upjRs+oQJLTDmKNyzVfLCvEcvd3ube|Mk+bxxMpijLjAgusr0EDawQ

Reference: http://commons.oreilly.com/wiki/index.php/PHP_Cookbook/Encryption_and_Security

Free Cloud Server Hosting


Hits: 7801  

Benefits of Free Cloud Hosting

* Self-Managed with Console
* Free storage
* Easy application deployment
* Production ready apps
* Cloud hosts (IaaS)
* Automatic backup & recovery
* Server resizing
* Migration facility
* Portability
* Cloud portability
* Free bandwidth
* Enhanced performance
* High availability of resources
* Data storage redundancy
* Growth flexibility
* Economical

AWS Free Usage Tier

Deploy a Sample Web Application in the Free Usage Tier
Deploy a Sample Web Application in the Free Usage Tier

Google App Engine – Easy to build, Easy to scale, Easy to maintain
Try Free … Google Cloud Storage, Google BigQuery and Google Cloud SQL

Google App Engine — Google Developers
Google App Engine — Google Developers

PHPCloud – Zend Developer Cloud, as its name suggests, a cloud-based environment designed to help you code more quickly and more efficiently. It includes a robust PHP stack, advanced debugging capabilities, collaboration tools and much more. Zend Developer Cloud is only a few clicks away and does not require any installation. To make it even better, it’s absolutely free!

PHP Cloud
PHP Cloud

HP Cloud – Open source-based public cloud computing HP tailored for developers and enterprise. Ready-to-use Storage, PaaS, IaaS, solutions from a rich partner community.

Cloud Computing - HP Cloud Services - Storage
Cloud Computing – HP Cloud Services – Storage

AppFog – The Best Public Cloud PaaS, Now Available on Private Clouds Simple, elegant, and modern way to develop and deploy apps. Unlimited apps within 2GB RAM, Up to 8 service instances 100MB per MySQL or PostgreSQL instance.

https://phpfog.com/ Rock-solid Cloud Platform for PHP by AppFog.

AppFog- PaaS for Public and Private Clouds
AppFog- PaaS for Public and Private Clouds

Xeround – A ridiculously simple, seriously powerful CLOUD DATABASE Xeround is an elastic, always-on database-as-a-service for your MySQL applications.

Cloud Database
Cloud Database

ClearDB is a reliable, fault tolerant database-as-a-service for your MySQL powered applications.

ClearDB - The Ultra Reliable, Globally Distributed Cloud Database For Your MySQL Applications
ClearDB – The Ultra Reliable, Globally Distributed Cloud Database For Your MySQL Applications

Gozure is cloud hosting built for website and blog owners. Run WordPress, Joomla, Drupal, and many other web applications on our powerful platform and get started for free. Gozure uses a simple control panel so no technical experience is necessary.

Gozure - Free Cloud Hosting
Gozure – Free Cloud Hosting

BitNami provides free, ready to run environments for your favorite open source web applications and frameworks, including Drupal, Joomla!, WordPress, PHP, Rails, Django and many more. And with BitNami Cloud Hosting, enjoy automatic backups, monitoring, and more.

BitNami- Open Source. Simplified
BitNami- Open Source. Simplified

PagodaBox is a relatively new Cloud PaaS provider, accessed at PagodaBox.com. PagodaBox markets itself is a PHP specialist. This is proven by the fact that PagodaBox features popular PHP projects like PyroCMS, WordPress, Kohana and CodeIgniter for easy 1-click installations.

Premier Cloud Hosting
Premier Cloud Hosting

OpenShift is Red Hat’s free, auto-scaling Platform as a Service (PaaS) for applications. As an application platform in the cloud, OpenShift manages the stack so you can focus on your code.

OpenShift by Red Hat
OpenShift by Red Hat

Cloud Foundry – Deploy and scale applications in seconds, without locking yourself into a single cloud.

Cloud Foundry
Cloud Foundry

Apprenda is an Open Platform as a Service (PaaS) stack that enables any organization to transform their existing infrastructure into a self-service cloud application platform.

Open Platform as a Service (PaaS) for .NET - Apprenda
Open Platform as a Service (PaaS) for .NET – Apprenda

The CloudBees Platform as a Service (PaaS) architecture provides a powerful foundation for cloud development and deployment services.

CloudBees- The Java PaaS Company
CloudBees- The Java PaaS Company

Orchestra is a Platform as a Service for deploying (PHP Hosting), scaling and managing PHP applications. Built on Amazon Web Services, it integrates with your workflow, autoscales up and down and gives you extra capabilities with powerful add-ons. Engine Yard provides a portfolio of options that let you begin deploying for your applications for free and then allows you to upgrade to elastic, dedicated resources when you’re ready to go into production. Think Orchestra PHP hosting for PHP development.

Ruby On Rails and PHP Cloud Hosting PaaS - Managed Rails Development - Engine Yard Platform as a Service
Ruby On Rails and PHP Cloud Hosting PaaS – Managed Rails Development – Engine Yard Platform as a Service

Jelastic Java Host – Rock-solid Java in the Cloud Auto-scales. Easy to deploy. Runs ANY Java app.

Jelastic — Top Java Host, Rock-Solid Java in the Cloud, Java Server Hosting, Java Cloud Computing
Jelastic — Top Java Host, Rock-Solid Java in the Cloud, Java Server Hosting, Java Cloud Computing

dotCloud – Build your ideal application stack by combining powerful cloud services. Experiment for free, then go live and only pay for what you need.

dotCloud - One home for all your apps
dotCloud – One home for all your apps

Cloudflare – Give us five minutes and we’ll supercharge your website.

CloudFlare - The web performance & security
CloudFlare – The web performance & security

And Many More ……..

If you are really interested in Cloud Computing, you can find more “Free PaaS” or “Free Cloud” to take advantage of free cloud hosting 😉

Responsive One Page HTML5 Templates


Hits: 6845  

I was searching one single page responsive HTML5 template for my product’s website. To sell your products you must have a introductory video and basic features on home page, that can help you to attract more customers..

You might include these items on home page…

– Top Navigation
– Introductory Video / Images
– Offer Price
– Featrues
– Technologies
– Payment Options
– Terms of Use
– Privacy
– Contact information

I have searched some templates .. hope you like below HTML5 themes 😉

Designed with the latest technologies and most advanced techniques, this one-page website loads lightning-fast!

The layout focus on usability, it offers enterprise-level features, design quality, technical implementation, compatibility, accessibility and performance.

Spark - Simple and effective
Spark – Simple and effective

Project Source bring Clarity and Efficiency to Your Content. It combines speed, usability and attractiveness.

Project Source – Lightning Speed
Project Source – Lightning Speed

Human is Responsive HTML5 theme, clean, simple theme, best suitable for company, personal or agency related websites. Please find bellow the main features of the theme.

Human Page
Human Page

Puree App Landing page if fully responsive, that means no matter what screen size your visitors are using your site will look and function great! The Puree App Template also comes touch enabled out of the box making the image slider and the rest of your site feel more native and freindly then ever on touch screen devices. The desktop has not been left out, Puree will also look good in pretty much every popular web browser on the internet!

Puree - Responsive App Landing Page Template
Puree – Responsive App Landing Page Template

LXPORTFOLIO SINGLE PAGE RESPONSIVE PORTFOLIO

LX Portfolio - Single Page Responsive Portfolio
LX Portfolio – Single Page Responsive Portfolio

SmartStart is a simple and clean but still professional template suitable for any business or portfolio, and it’s created by using the latest HTML5 and CSS3 techniques. With a responsive design it is easily usable with any device (Desktop, tablet, mobile phone), without removing any content!

Home - SmartStart
Home – SmartStart

Locus is a jQuery enhanced responsive HTML template with Filtered portfolio, One page news, three different skins and more.

Locus - Responsive One Page Template
Locus – Responsive One Page Template

Box Two, a responsive single page portfolio. Try using J and U buttons on your keyboard for quick scrolling.

Box Two - A Responsive One Page Theme
Box Two – A Responsive One Page Theme

Moloko is built with Twitter Bootstrap. It is Responsive, Sleek, intuitive, and powerful front-end framework for faster and easier web development.

Moloko By Josweb
Moloko By Josweb

Initializr is an HTML5 templates generator to help you getting started with a new project based on HTML5 Boilerplate. It generates for you a clean customizable template with just what you need to start!

Initializr - Start an HTML5 Boilerplate project in 15 seconds!
Initializr – Start an HTML5 Boilerplate project in 15 seconds!

Rythm is based on the Bootstrap CSS framework, which provides a future-proof foundation for the design and layout.

Rythm - Responsive One-Page Template
Rythm – Responsive One-Page Template

Artix, built with Twitter Bootstrap.

Artix By Josweb
Artix By Josweb

Aura is beautiful websites, elgant themes and stunning visual designs.

Aura v3.0 by Designova - Responsive Bootstrap HTML5
Aura v3.0 by Designova – Responsive Bootstrap HTML5

Aside360° is a responsive One-Page HTML5 template with grid system layout.

Aside360° - Responsive HTML5 One-Page Template
Aside360° – Responsive HTML5 One-Page Template

Build your business on Google Cloud Platform


Hits: 5267  

Hope you already read my old article “Application Setup on Google App Engine”

Google Cloud Platform allows to build applications and websites, store and analyze data on Google’s infrastructure.

Google Cloud Platform
Google Cloud Platform

Features of Google Cloud Platform

* Scale your app – Take advantage of the speed and scale of Google’s applications.

* Focus on building – Deal with capacity planning and data center infrastructure.

* Save on costs – Pay only for what used.

* Fast Data Access – Quick and easy access to data around multiple regions.

* Reliable & Secure infrastructure – Google provides highly available, robust storage for your mission-critical data.

* Unlimited Storage – Store and manage unlimited number of objects within Application.

* Fully managed – Google will take care of replication, patch management or database management.

Solutions on Google Cloud Platform

Google App Engine
Google Cloud Storage
Google BigQuery
Google Cloud SQL
Google Compute Engine
Google Prediction API
Google Translation API

Google Cloud Platform
Google Cloud Platform

Over 1M applications run on Google Cloud Platform

Build Apps and Websites – Build apps and websites on Google’s infrastructure with Google App Engine.

Compute at Google Scale – Run Linux Virtual Machines in the cloud using Google Compute Engine.

Store your Data – Store and manage data on Google’s infrastructure with Google Cloud Storage.

Analyze Big Data – Analyze Big Data at astonishing speed using Google BigQuery.

Mobile Apps using Google App Engine

Google App Engine provide friction-less development environment to makes scale-able mobile back-end on Google’s infrastructure with less worries.

It goes live fast, scale infinitely and get started easily…

Business on Google Cloud Platform

Business on Google Cloud Platform
Business on Google Cloud Platform

You can download SDK to start building your app on Google App Engine.

If you are interested for creating Applications on Google Cloud Platform … Please Contact us

Email: svnlabs[at]gmail.com
Skype: svnlabs
MSN: svnlabs[at]hotmail.com

Best JavaScript Obfuscator


Hits: 5310  

JavaScript Obfuscator- Compress JavaScript. Minification is the practice of removing unnecessary characters from code to reduce its size, thus improving load times.

JavaScript Obfuscator- Free JavaScript Obfuscation Tool
JavaScript Obfuscator- Free JavaScript Obfuscation Tool

JavasScript minification made easy

The JavaScript compressor can compress your JavaScript.

Compress formats: high ASCII, numeric encoding, normal encoding and even no encoding at all.

JavaScript-Obfuscator.com’s JavaScript Compressor works with all sort of JavaScript.

Free Javascript Obfuscator
Free Javascript Obfuscator

Protects JavaScript code from stealing and shrinks size

JavaScript Obfuscation has the largest impact on webpage performance and speed 😉

Adobe Flash ExternalInterface issues with Internet Explorer


Hits: 4511  

I was working for HTML5 Audio.js Player… I really like calling ExternalInterface when using SWFObject on Windows XP IE 8. You can’t use an actionscript callback for a certain set of keywords (“play”, “stop”, “tags”, “item”, “length” etc.) will break in IE and cause a javascript error.

Object doesn’t support this property or method

public function audiojs():void {
Security.allowDomain(“*”);

this.playerInstance = root.loaderInfo.parameters.playerInstance+’.’;

ExternalInterface.addCallback(‘init’, init);
ExternalInterface.addCallback(‘load’, load);
ExternalInterface.addCallback(‘playPause’, playPause);
ExternalInterface.addCallback(‘pplay‘, play);
ExternalInterface.addCallback(‘ppause‘, pause);
ExternalInterface.addCallback(‘skipTo’, skipTo);
ExternalInterface.addCallback(‘setVolume’, setVolume);

ExternalInterface.call(this.playerInstance+’loadStarted’);
}

Audio.js
IE doesn’t allow a method named play() to be exposed through ExternalInterface, so lets go with pplay().
Use ppause() for consistency with pplay(), even though it isn’t really required.

Avoid common names like play & pause when using ExternalInterface Call. 😉

Best HTML5 JavaScript Frameworks for Mobile Development


Hits: 12209  
jQuery Mobile - jQuery Mobile
jQuery Mobile – jQuery Mobile

A unified, HTML5-based user interface system for all popular mobile device platforms, built on the rock-solid jQuery and jQuery UI foundation. Its lightweight code is built with progressive enhancement, and has a flexible, easily themeable design.

jQuery mobile framework takes the “write less, do more” mantra to the next level: Instead of writing unique apps for each mobile device or OS, the jQuery mobile framework allows you to design a single highly-branded web site or application that will work on all popular smartphone, tablet, and desktop platforms.

HTML5 App Development Tools. Build Apps for Any Device with Sencha. - Home - Sencha
HTML5 App Development Tools. Build Apps for Any Device with Sencha. – Home – Sencha

Sencha – powerful design and coding tools, industry-leading JavaScript frameworks, and the support required for serious business app development, Sencha Complete is everything you need to build HTML5-based apps that work perfectly in today’s—and tomorrow’s—multi-device world.

jQTouch — Zepto-jQuery plugin for mobile web development
jQTouch — Zepto-jQuery plugin for mobile web development

A Zepto/jQuery plugin for mobile web development on the iPhone, Android, iPod Touch, and other forward-thinking devices.

jqMobi
jqMobi

jqMobi is lightweight query selector library for mobile devices. It comes with over 60 api calls and jQuery compatible syntax.

Mobilize.js
Mobilize.js

Mobilize.js allows web developers create mobile sites out of existing websites with little effort.
Automatically detect mobile browsers
Easy to integrate – no server side changes needed
Open source – no expensive software or licenses needed
Familiar HTML5, Javascript and JQuery Mobile tools used
Supports iPhone, Android, Blackberry, Opera Mini and many other browsers and devices

iUI - Mobile web framework for high-end devices
iUI – Mobile web framework for high-end devices

Create mobile websites & webapps with a native look-alike in no time. You don’t need to have any HTML5, CSS3 or Javascript skills.
iUI supports iOS, Android, Rim OS6, MeeGo, Bada, WebOS, … smartphones and tablets.

Jo HTML5 Mobile App Framework
Jo HTML5 Mobile App Framework

For iOS, Android, webOS, BlackBerry, Chrome OS & anything else with HTML5 Widgets, lists and scrolling goodness using JavaScript & CSS3 Make native mobile apps or web apps with the same code Works great with PhoneGap.

Zepto.js- the aerogel-weight jQuery-compatible JavaScript library
Zepto.js- the aerogel-weight jQuery-compatible JavaScript library

Zepto is a minimalist JavaScript library for modern browsers with a largely jQuery-compatible API. If you use jQuery, you already know how to use Zepto.

KineticJS HTML5 Canvas Framework
KineticJS HTML5 Canvas Framework

Enterprise class interactive .. web graphics … KineticJS is an HTML5 Canvas JavaScript framework that enables high performance animations, transitions, node nesting, layering, filtering, caching, event handling for desktop and mobile applications, and much more.

Lungo - Mobile Framework... and stuff.
Lungo – Mobile Framework… and stuff.

A framework for developers who want to design, build and share cross device applications.

jQWidgets - jQuery, JavaScript and HTML5 Plugins
jQWidgets – jQuery, JavaScript and HTML5 Plugins

jQWidgets is a comprehensive and innovative widget library built on top of the jQuery JavaScript Library. It empowers developers to deliver professional, cross-browser compatible web applications, while significantly minimizing their development time. jQWidgets contains more than 30 UI widgets and is one of the fastest growing JavaScript UI frameworks on the Web.

Trigger.io - mobile platform for web developers
Trigger.io – mobile platform for web developers

Build amazing mobile apps using the best of HTML5 and native…

AngularJS — Superheroic JavaScript MVW Framework
AngularJS — Superheroic JavaScript MVW Framework

HTML is great for declaring static documents, but it falters when we try to use it for declaring dynamic views in web-applications. AngularJS lets you extend HTML vocabulary for your application. The resulting environment is extraordinarily expressive, readable, and quick to develop.

BarleyJS.com - The lightest Html5 mobile framework
BarleyJS.com – The lightest Html5 mobile framework

BarleyJS is licensed under free commercial and open source licenses for application development, and a paid commercial license for OEM uses.

The-M-Project - Mobile HTML5 JavaScript Framework
The-M-Project – Mobile HTML5 JavaScript Framework

The-M-Project is a Mobile HTML5 JavaScript Framework that helps you build great mobile apps, easy and fast.

The-M-Project is Open Source Software published under the MIT License. This gives you total flexibility for your development. Build great free and commercial apps with it.

Wink toolkit - A mobile JavaScript framework to build great webapps
Wink toolkit – A mobile JavaScript framework to build great webapps

Wink Toolkit is a lightweight JavaScript toolkit which will help you build great mobile web apps. It is designed and developed to meet the specific constraints of the mobile environment.

The toolkit’s core offers all the basic functionalities a mobile developer would need from touch event handling to DOM manipulation objects or CSS transforms utilities. Additionally, it offers a wide range of UI components to help you improve the look and feel of a web app, or simply to experiment with new user interactions.

Recover MySQL root Password


Hits: 3038  

1. Stop the MySQL server.

# /etc/init.d/mysql stop

2. Start the MySQL server process with the –skip-grant-tables option so that it will not prompt for password.

# mysqld_safe –skip-grant-tables &

3. Connect to mysql server as the root.

# mysql -u root

mysql password
mysql password

Welcome to the MySQL monitor….
………..
Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.
mysql>

4. Setup new mysql root account password i.e. reset mysql password.

mysql> use mysql;
mysql> update user set password=PASSWORD(“NEW-PASSWORD”) where User=’root’;
mysql> flush privileges;
mysql> quit

5. Exit and restart the MySQL server.

# /etc/init.d/mysql stop

6. Start MySQL server.

# /etc/init.d/mysql start
# mysql -u root -p