Posted on January 2nd, 2008 by Jannu
Worrying of LOST the ROOT Password. Don’t have to worry. Here is the trick, to get it solved and recover the reset the password, so that you can login to MySQL again.
Firstly, stop theMySQL Server as below:
# /etc/init.d/mysql stop
Then start the MySQLD daemon with -skip-grant-tables as shown below:
# mysqld_safe –skip-grant-tables &
Now Connect to MySQL server […]
Popularity: 51% [?]
No Comments »
Filed under: Mysql Tips & Tricks
Posted on December 31st, 2007 by Jannu
As the database is a critical thing to handle, one needs to monitor and take backups periodically. For this following command is used to take backup of MySQL Database.
#mysqldump -u user_name -p pass_word db_name > db_name.sql
For restoring the database from the backup file:
#mysql -u root -p root_password db_name < db_name.sql
Powered by ScribeFire.
Popularity: 51% [?]Share This
Popularity: 51% [?]
1 Comment »
Filed under: Mysql Tips & Tricks
Posted on December 31st, 2007 by Jannu
If you are not giving the below said privileges to the user, then you
can only give permissions to appropriate database as shown below:
mysql> grant all privileges on guest.* to
-> ‘guest’@'localhost’ identified
-> by ‘1234567890′ with grant option;
mysql> flush privileges;
Here ‘guest’ is the Database name and ‘guest.*’ means granting […]
Popularity: 42% [?]
1 Comment »
Filed under: Mysql Tips & Tricks
Posted on December 31st, 2007 by Jannu
For adding a new user to MySQL you just need to add a new entry to user table in database mysql. Login as root to mysql as shown below:
$ mysql -u root -p (if Root Password is set.)
$ mysql -u root (If password is not set for root)
It is recommended to have […]
Popularity: 40% [?]
No Comments »
Filed under: Mysql Tips & Tricks
Posted on December 31st, 2007 by Jannu
Method 1#If you have never set a root password for MySQL, the server does notrequire a password at all for connecting as root. To setup rootpassword for first time, use mysqladmin command at shell prompt asfollows:
$ mysqladmin -u root password NEWPASSWORD
However if you want to change (or update) a root password, then […]
Popularity: 43% [?]
No Comments »
Filed under: Mysql Tips & Tricks, Uncategorized