Archive

Archive for the ‘Database’ Category

MySQL configuration and management

November 10th, 2008 admin No comments

How to set up the MySQL root password?
In the MySQL command prompt space, execute: update user set Password=PASSWORD(‘new-password’) where user=’root’;

Then: flush privileges;

Now, quit;

Try to log in: mysql

Oh! You can’t log in as done before. It is a normal situation. In order to log in again to the MySQL database server, excute:

mysql -u root -p

Then, enter your password and your back in again.

However, to use the “root” MySQL account for most usage is not a good advice. In contrast, you can give a user (of MySQL) certain privileges on the management of any number of databases. For example: To give permission usage and database management to the user “sky” in the database “jet”, do it:

GRANT select, insert, update, create, alter, delete, drop ON jet.* TO sky@localhost IDENTIFIED BY ‘password_of_the_user:_sky’;

These database privileges applies in the localhost.

Categories: Database Tags: