Recover MySQL root Password


Hits: 3083  

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

 

 

Replace phpMyAdmin by Adminer


Hits: 5069  

Adminer (formerly phpMinAdmin) is a full-featured database management tool written in PHP. It consist of a single file ready to deploy to the target server. Adminer is available for MySQL, PostgreSQL, SQLite, MS SQL and Oracle.

phpMyAdmin-Adminer
phpMyAdmin-Adminer

phpMyAdmin is one of the most famous tools for managing the MySQL database. However, Adminer have important differences with phpMyAdmin are:

* User experience
* Supported MySQL features
* Performance
* Security

adminer-screenshot
adminer-screenshot

Replace phpMyAdmin by Adminer and you will get better user interface, better support for MySQL features, higher performance and more security.

Features

* Connect to a database server with username and password
* Select an existing database or create a new one
* List fields, indexes, foreign keys and triggers of table
* Change name, engine, collation, auto_increment and comment of table
* Alter name, type, collation, comment and default values of columns
* Add and drop tables and columns
* Create, alter, drop and search by indexes including fulltext
* Create, alter, drop and link lists by foreign keys
* Create, alter, drop and select from views
* Create, alter, drop and call stored procedures and functions
* Create, alter and drop triggers
* List data in tables with search, aggregate, sort and limit results
* Insert new records, update and delete the existing ones
* Supports all data types, blobs through file transfer
* Execute any SQL command from a text field or a file
* Export table structure, data, views, routines, databases to SQL or CSV
* Alter export for projecting changes to production database
* Print database schema connected by foreign keys
* Show processes and kill them
* Display users and rights and change them
* Display variables with links to documentation
* Manage events and table partitions (MySQL 5.1)
* Schemas, sequences, user types (PostgreSQL)
* Extensive customization options

Requirements

* Works with MySQL, PostgreSQL, SQLite, MS SQL, Oracle – Improve your driver
* Supports both PHP 4.3.3+ and PHP 5 with enabled sessions
* Available in Arabic, Catalan, Chinese, Czech, Dutch, English, Estonian, French, German, Hungarian, Italian, Japanese, Lithuanian, Persian, Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovenian, Spanish, Tamil, Turkish, Ukrainian, … (28) – Create a new translation
* Free for commercial and non-commercial use (Apache License or GPL 2)

SQL OR NOSQL?


Hits: 3875  

If you are searching for SQL or noSQL solutions, it is very difficult to decide among top SQL / noSQL Databases.

MySQL is the best for multi-document transactions, complex security, complex join, extreme compression.

NoSQL is good for linear scalability, high performance, schema flexibility.

But both depend on data need to manage 😉

Scalability

MySQL support master and slave approach for scaling (vertical scalability).
NoSQL supports horizontal scalability.

Vertical scalability is the ability to increase the capacity of existing hardware or software by adding resources – for example, adding processing power to a server to make it faster. On the other hand, horizontal scalability is the ability to connect multiple entities so that they work as a single logical unit.

Flexibility

SQL is the best for query flexibility, SQL supports both simple and complex queries.
MongoDB supports SQL query and indexes.

Down Time

NoSQL perform well for database size and server performance.

Transactions

SQL is king of transactions.
MongoDB and Redis support limited transactions.

Hosting

Every database solution need deployment, backups, monitoring, and performance tuning.

NoSQL are modern web-scale databases having qualities of non-relational, distributed, open-source and horizontally scalable database.