25.6. Instructions for Setting Up a MySQL User Account

For the MySQL examples to execute correctly, you need to set up a user account that allows users to create, delete and modify a database. After MySQL is installed, follow the steps below to set up a user account (these steps assume MySQL is installed in its default installation directory):

1.
Open a Command Prompt and start the database server by executing the command mysqld-nt.exe. Note that this command has no output—it simply starts the MySQL server. Do not close this window—doing so terminates the server.
2.
Next, you’ll start the MySQL monitor so you can set up a user account, open another Command Prompt and execute the command
mysql -h localhost -u root
The -h option indicates the ...

Get Java™ How to Program, Seventh Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.