Tighten mySql Security


MySQL has first-class security controls, but the default installation is unprotected. So, if you're doing a new installation, let's lock things up prior to going any further. Certainly, change NewRootName and NewPassword, below, to something unique.

mysql> delete from user where Host='%';
mysql> delete from user where User='';
mysql> delete from db where Host='%';
mysql> update user set User='NewRootName', Password=password('NewPassword') where User='root';
mysql> flush privileges;

Creating a Simple Database and Displaying its Structure

Instruct MySQL to setup a new database

mysql> create database database01;
Database "database01" created.

All that really does is create a new subdirectory in your c:\mysql\data directory.

Open the database

mysql> use database01
Database changed



Copyright © 1999-2003. Maxis Media Studios, LLC All Rights Reserved.
Montreal Web Design - Maxis Media