Creating an Account for Basic Use


It is usually a good idea to use some account other than root for basic day-to-day work for security reasons.

We will briefly cover how to create a separate account now. For full details of how user accounts work in MySQL, read Chapter 11, "Managing User Privileges."

Create an account for day-to-day use by typing the following:

 
 grant create, create temporary tables, delete, execute, index, insert,  lock tables, select, show databases, update on *.* to  username  identified by '  password  '; 

Obviously, you should substitute your own username and password into this command.

You should now log out and log back in with the username and password you set. You will need to use a root account for some of the things we will do in the later chapters of this book, but this account we have just created has fewer privileges than root, so it is safer for day-to-day use.



MySQL Tutorial
MySQL Tutorial
ISBN: 0672325845
EAN: 2147483647
Year: 2003
Pages: 261

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net