It wont connect to MySQL Server 4.1 from PHp runnunig the code below. This is the very 1st time i try to build a DataBase at all.
Can not get it to work. ""HELP PLEASE"!!
"I have been stock for days now." FROM A BEGINER (
[email protected])
MYSQL SERVER 4.1
ERROR output Mesage ON BROWSER:
---Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in C:\Program Files\Apache Group\Apache2\Test\createmovie.php on line 8
Hey check yourn connection.---
CODE:
<body>
<?php
-LINE 8- $connect = mysql_connect("localhost", "root", "MYPASSWORD") or die ("Hey check yourn connection.");
//Create a Data base
mysql_create_db("wiley")
or die(mysql_error());
// verify the current DB is the activeone
mysql_select_db ("wiley");
//Create "movie" table
$movie = "CREATE TEBLE movie (
movie_id int(11) NOT NULL auto_increment,
movie_name varchar(255) NOT NULL,
movie_type tinyint(2) NOT NULL default 0,
movie_year int(4) NOT NULL default 0,
movie_leadactor int(11) NOT NULL default 0,
movie_director int(11) NOT NULL default 0,
PRIMARY KEY (movie_id),
KEY movie_type (movie_type,movie_year)
) TYPE=MyISAM AUTO_INCREMENT=4 ";
$results = mysql_query($movie)
or die (mysql_error());
//Create "movietype" table
$movietype = "CREATE TABLE movietype (
movietype_id int(11) NOT NULL auto_increment,
movietype_label varchar(100) NOT NULL,
PRIMARY KEY (people_id)
)TYPE=MyISAM AUTO_INCREMENT=9";
$results = mysql_query($movietype)
or die(mysql_error());
// Create "people" Table
$people = "CREATE TABLE people (
people_id int(11) NOT NULL auto_increment,
people_fullname varchar(255) NOT NULL,
people_isactor tinyint(1) NOT NULL default 0,
people_isdirector tinyint(1) NOT NULL default 0,
PRIMARY KEY (people_id)
) TYPE=MyISAM AUTO_INCREMENT=7";
$results = mysql_query($people)
or die(mysql_error());
echo "Movie Database sucesfully created! ";
?>
</body>
</html>