Web Developer's Virtual Library: Encyclopedia of Web Design Tutorials, Articles and Discussions


WDVL Newsletter

Active Server Pages
JSP/Java Servlets
Microsoft SQL Server
Daily Backup
Dedicated Servers
Streaming Audio/Video
24-hour Support    

jobs.webdeveloper.com

Hiermenus


e-commerce
Partner With Us















Developer Channel
FlashKit.com
JavaScript.com
JavaScriptSource
Developer Jobs
ScriptSearch
StreamingMediaWorld
Web Developer's Journal
Web Developer's Virtual Library
WebDeveloper.com
Webreference
Web Hosts
XMLfiles.com

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers


Privileged MySQL

October 11, 1999

Prudently speaking, we need to take a few moments to consider the security model implemented in MySQL. After all, the MySQL server listens to a network port, and thus anyone could conceivably connect to the server. But you probably don't wish any random person to be able to query your database or, worse, write to your database, adding or deleting data. MySQL uses a security model based on usernames, password, and privileges quite similar to Unix's own security model.

An individual accessing the MySQL server has three identifying traits: a username, a password, and an originating host. When you assign privileges with MySQL, they are matched to the combination of a guest's username, password, and host. Sensible enough. For instance, you may wish to require that user "NiceGuy" with the password "ToughPass" connecting from any host in the nice.net domain, has read-only access to a database. There are actually quite a few possible permutations of these privileges ... you can read the whole mindnumbing treatise in the MySQL manual's Privilege System documentation.

When you first install MySQL it is insecure, as the root account has no password. So your first act should be to create a root password. Do remember that these MySQL user accounts are in no way connected to the user accounts in your Unix system, they are simply similar in nature. You'll find in mysql/bin a utility named mysqladmin, which is a quick way to access certain administrative functions of the server (you can also use the mysql/bin/mysql interactive client but the commands are longer). So, create a new root password:

/path/to/mysql/bin/mysqladmin -u root password new_password

For example:

/usr/local/mysql/bin/mysqladmin -u root password my!dog#99

Remember this root password, since it is the key to your master account with which you can administrate all your MySQL databases, and create, remove, or modify other MySQL access accounts.

MySQL Prep
The Perl You Need to Know
Your first MySQL Database


Up to => Home / Authoring / Languages / Perl / PerlfortheWeb




Jupiter Online Media: internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and Jupiter Online Media

Jupitermedia Corporate Info


Legal Notices, Licensing, & Permissions, Privacy Policy.

Web Hosting | Newsletters | Tech Jobs | Shopping | E-mail Offers