![]() |
| |||||||
|
The first three tips showed how to install MySQL and how to create a new database and user. If you wish to use MySQL with Apache-PHP, and you are using Apple's PHP install, then you'll have problems. Firstly, Apple's PHP install, at the time of writing, was built to use old-style MySQL password encryption, whereas MySQL 4.1 and later use the new-style encryption. To allow PHP to connect to a database, either don't give a password by missing out: identified by 'password';when you create a new user. Alternatively, create a new user with an old-style password. To do this, create the user as given in Wednesday's tip and then type (this example shows a user called jan): # mysql -u root -pEnter password: mysql> set password for jan@localhost = old_password('jans-password'); mysql> quit Bye $ Also, as of the Tiger 10.4.4 update, and until Apple corrects it, the Apache-PHP module was built in a way that's incompatible with most MySQL installs. This can be corrected by building your own PHP install, as shown in Friday's tip. Visit the Site of the Book of the Unix Tips: Discuss this trick in the OSXFAQ Learning Center forum E-mail your comments or suggestions to webmaster@osxfaq.com
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||