Re: Newbie seeks help with PHP and MySQL

From: Date: Wed, 18 Apr 2001 20:03:32 +0000
Subject: Re: Newbie seeks help with PHP and MySQL
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-6836@lists.php.net to get a copy of this message
Hi, did you set up a user? If not did you connect as "root"? Have you set a password for your root? Questions, questions. Some hints though: If you haven't set a pswd for root do so. Go to msdos, tpye the path of the mysql\bin directory and then "mysql -u root". You should now be in the mysql-shell. By typing "\s" you can see which DB you are using.To switch to the mysql DB type \u mysql. A "database changed" comes up. To set a pswd: "UPDATE user SET password=PASSWORD('YourNewPassword') WHERE user='root'; Think about getting phpMyAdmin for local administration. You can set up a new user. For the mysql-priviledge-system check the manual (your best friend ;). To give the user the priviledges type as root: GRANT select, insert, delete, priv, priv... ON YourDB.* TO YourUser; If user doesn't exist you can add "IDENTIFIED BY 'Password'. This creates a new user with the specified priviledges. You don't put username or pswd in mysql_select_db. The identification is done in mysql_conncet or mysql_pconnect. hope it helps, cheers johannes ""r.gelstharp"" <r.gelstharp@ntlworld.com> schrieb im Newsbeitrag news:9bkmub$9bn$2@toye.p.sourceforge.net... > I'm new to the game of PHP and MySQL but have the latest versions of both > installed along with Apache on my Win 98 machine. > > I'm having problems connecting to a database I know is there, an empty one > that I'm trying to use PHP to add tables to. > In the "die()" statement to the "mysql_select_db()" function I put > mysql_error and it came out with the message that I had no priviliges to the > database. > > How in MySQL do I get user access priviliges and how/where in the > mysql_select_db() statement would you put a username and password? > > Thanks. > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net > For additional commands, e-mail: php-windows-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.windows (#6836) next »