- Monday, February 14, 2011, 16:45
- Database, HOW TOs, Linux, MySQL
If you lost your mysql root password then try the following steps.
# /etc/init.d/mysql stop
# mysqld_safe --skip-grant-tables --user=root
Then from another shell,connect to mysql
# mysql -u root
Full story
- Tuesday, October 5, 2010, 4:51
- Database, MySQL
1. How to set password for root account in MySQL Server??
#mysqladmin -u root password your-new-password
#/etc/init.d/mysqld restart
2. How to add a new user account in MySQL Server??
From mysql frompt
CREATE USER IDENTIFIED BY PASSWORD 'password';
3. How to add privilleges ...
Full story
Here is the sample shellscript to take backup of all batabase
{code codetype=php}
#!/bin/bash
export DB_BACKUP="/backup/mysql_backup"
Full story
- Thursday, July 29, 2010, 7:21
- Database, Linux, MySQL
mysqldump to create a simple backup of database.Here we are using mysqldump to backup database 'db' to dumb.sql
#mysqldump -u root -p db >dumb.sql
This will ask for root password.After entering the root password database 'db' dump into dump.sql
Full story
- Monday, July 26, 2010, 8:27
- Database, MySQL, SQL basics
This is the one of method to joining two tables. It returns all rows when there is at least one match in both tables
Syntax of the inner join query:
Full story
- Monday, July 26, 2010, 8:21
- Database, MySQL, SQL basics
This is the one of method to joining two tables. It returns all rows from the left table, even if there are no matches in the right table
Full story
- Monday, July 26, 2010, 8:16
- Database, MySQL, SQL basics
This is the one of method to joining two tables. It returns all rows from the left table, The RIGHT JOIN keyword Return all rows from the right table (table_name2), even if there are no matches in the left table (table_name1).
Full story