Starting a web site - PHP SOLUTIONS: DYNAMIC WEB DESIGN MADE EASY 4.
Thursday, March 20th, 2008PHP SOLUTIONS: DYNAMIC WEB DESIGN MADE EASY 4. Assuming that you have logged in successfully, as described in step 2, type the following command at the mysql> prompt: use mysql This command tells MySQL that you want to use the database called mysql, which contains all the details of authorized users and the privileges they have to work on database files. You should see the message Database changed, which means MySQL is ready for you to work on the files controlling administrative privileges. 5. Now enter the command to set a password for the root user. Substitute myPassword with the actual password you want to use. Also make sure you use quotes where indicated and finish the command with a semicolon. UPDATE user SET password = PASSWORD(’myPassword’) WHERE user = ‘root’; 6. Next, remove anonymous access to MySQL: DELETE FROM user WHERE user = ‘’; The quotes before the semicolon are two single quotes with no space in between. 7. Tell MySQL to update the privileges table: FLUSH PRIVILEGES; The sequence of commands should produce a series of results like this: 8. To exit the MySQL monitor, type exit, followed by Return. This simply ends your session with the MySQL monitor. It does not shut down the MySQL server. 9. Now try to log back in by using the same command as in step 2. MySQL won t let you in. Anonymous access and password-free access have been removed. To get in this time, you need to tell MySQL that you want to use a password: mysql -u root -p 10. When you press Return, you will be prompted for your password. Nothing will appear onscreen as you type, but as long as you enter the correct password, MySQL will let you back in. Congratulations, you now have a secure installation of MySQL.
In case you need affordable webhost to host your website, our recommendation is ecommerce web host services.