AndrewJW1313 wrote:
Quote:
I'm running Windows XP Home Edition -- does that make a difference how I enter
the information into the MySQL monitor? |
No. MySQL monitor works exactly the same on all operating systems.
Quote:
Also, the book does not provide
instructions for creating user names, passwords or user accounts. It pretty
much says to install MySQL with all of the defaults and when you are trying to
connect to to the datbase through DW, enter "root" as the username and leave
the password blank, |
That is appalling. If you're going to be able to use PHP and a MySQL
database on your hosting company, you need to know how to set up user
accounts, permissions and passwords.
Quote:
but if you could, please tell me how to set up my username/password/user
accounts in MySQL. |
Since you have been given no instructions, I presume you can open MySQL
monitor with just the following:
mysql -u root
If so, once you get in, type the following commands (all followed by Enter):
use mysql;
UPDATE user SET password = PASSWORD('my_password') WHERE user = 'root';
DELETE FROM user WHERE user = '';
GRANT SELECT, INSERT, DELETE, UPDATE ON *.* TO dbadmin@localhost
IDENTIFIED BY 'my_admin_password';
FLUSH PRIVILEGES;
exit;
That will set up a password for the root user (use your own password
instead of my_password). It will also set up an administrative user
called dbadmin (again, substitute your own password for
my_admin_password. Make sure you use quotes in the same places that I
have. Also make sure you use the semicolon - that tells MySQL that you
have finished entering a command.
Test both usernames and passwords by opening MySQL monitor.
mysql -u root -p
You will be prompted this time for a password. Use the root password.
Once you're in, just type exit and press Enter. Then try to get back in
as dbadmin:
mysql -u dbadmin -p
Again you'll be asked for the dbadmin password.
When connecting from Dreamweaver, use the dbadmin username and password.
I hope the book shows you how to set up a database and some tables.
--
David Powers
Author, "Foundation PHP 5 for Flash" (friends of ED)
Co-author "PHP Web Development with DW MX 2004" (Apress)
http://computerbookshelf.com